Skip to content

Commit ab4363a

Browse files
committed
Add requesty to connect-src
1 parent f25812d commit ab4363a

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
@@ -723,7 +723,7 @@ export class ClineProvider extends EventEmitter<ClineProviderEvents> implements
723723
<meta charset="utf-8">
724724
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
725725
<meta name="theme-color" content="#000000">
726-
<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;">
726+
<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;">
727727
<link rel="stylesheet" type="text/css" href="${stylesUri}">
728728
<link href="${codiconsUri}" rel="stylesheet" />
729729
<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)