Skip to content

Commit a72e04b

Browse files
committed
fix: update PostHog CSP configuration and add ui_host parameter
1 parent ad437b1 commit a72e04b

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

apps/web-roo-code/src/components/providers/posthog-provider.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export function PostHogProvider({ children }: { children: React.ReactNode }) {
5656
// Initialize PostHog with appropriate persistence based on consent
5757
posthog.init(posthogKey, {
5858
api_host: posthogHost || "https://ph.roocode.com",
59+
ui_host: posthogHost || "https://ph.roocode.com",
5960
capture_pageview: false, // We handle pageview tracking manually
6061
loaded: (posthogInstance) => {
6162
if (process.env.NODE_ENV === "development") {

src/core/webview/ClineProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1196,7 +1196,7 @@ export class ClineProvider
11961196
<meta charset="utf-8">
11971197
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
11981198
<meta name="theme-color" content="#000000">
1199-
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; font-src ${webview.cspSource} data:; style-src ${webview.cspSource} 'unsafe-inline'; img-src ${webview.cspSource} https://storage.googleapis.com https://img.clerk.com data:; media-src ${webview.cspSource}; script-src ${webview.cspSource} 'wasm-unsafe-eval' 'nonce-${nonce}' https://us-assets.i.posthog.com 'strict-dynamic'; connect-src ${webview.cspSource} ${openRouterDomain} https://api.requesty.ai https://us.i.posthog.com https://us-assets.i.posthog.com;">
1199+
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; font-src ${webview.cspSource} data:; style-src ${webview.cspSource} 'unsafe-inline'; img-src ${webview.cspSource} https://storage.googleapis.com https://img.clerk.com data:; media-src ${webview.cspSource}; script-src ${webview.cspSource} 'wasm-unsafe-eval' 'nonce-${nonce}' https://ph.roocode.com 'strict-dynamic'; connect-src ${webview.cspSource} ${openRouterDomain} https://api.requesty.ai https://ph.roocode.com;">
12001200
<link rel="stylesheet" type="text/css" href="${stylesUri}">
12011201
<link href="${codiconsUri}" rel="stylesheet" />
12021202
<script nonce="${nonce}">

webview-ui/src/utils/TelemetryClient.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class TelemetryClient {
1414

1515
posthog.init(apiKey, {
1616
api_host: "https://ph.roocode.com",
17+
ui_host: "https://ph.roocode.com",
1718
persistence: "localStorage",
1819
loaded: () => posthog.identify(distinctId),
1920
capture_pageview: false,

0 commit comments

Comments
 (0)