Skip to content

Commit 136cf99

Browse files
authored
Add requesty to connect-src (#2155)
1 parent a6ed5ce commit 136cf99

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.changeset/hot-garlics-join.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"roo-cline": patch
3+
---
4+
5+
Fix bug in loading Requesty key balance

src/core/webview/ClineProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ export class ClineProvider extends EventEmitter<ClineProviderEvents> implements
705705
<meta charset="utf-8">
706706
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
707707
<meta name="theme-color" content="#000000">
708-
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; font-src ${webview.cspSource}; style-src ${webview.cspSource} 'unsafe-inline'; img-src ${webview.cspSource} data:; script-src 'nonce-${nonce}' https://us-assets.i.posthog.com; connect-src https://openrouter.ai https://us.i.posthog.com https://us-assets.i.posthog.com;">
708+
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; font-src ${webview.cspSource}; style-src ${webview.cspSource} 'unsafe-inline'; img-src ${webview.cspSource} data:; script-src 'nonce-${nonce}' https://us-assets.i.posthog.com; connect-src https://openrouter.ai https://api.requesty.ai https://us.i.posthog.com https://us-assets.i.posthog.com;">
709709
<link rel="stylesheet" type="text/css" href="${stylesUri}">
710710
<link href="${codiconsUri}" rel="stylesheet" />
711711
<script nonce="${nonce}">

src/core/webview/__tests__/ClineProvider.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ describe("ClineProvider", () => {
378378

379379
// Verify Content Security Policy contains the necessary PostHog domains
380380
expect(mockWebviewView.webview.html).toContain(
381-
"connect-src https://openrouter.ai https://us.i.posthog.com https://us-assets.i.posthog.com;",
381+
"connect-src https://openrouter.ai https://api.requesty.ai https://us.i.posthog.com https://us-assets.i.posthog.com;",
382382
)
383383
expect(mockWebviewView.webview.html).toContain("script-src 'nonce-")
384384
})

0 commit comments

Comments
 (0)