Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(core): allow cloudflare insights origin in csp #6375

Merged
merged 1 commit into from
Aug 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/core/src/middleware/koa-security-headers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
crossOriginOpenerPolicy: false, // Allow cross origin opener, as some apps rely on popup window for the sign-in flow
// Google One Tap iframe request does not respond the proper CORP header (it uses `same-site` instead of `cross-origin`)
// and we cannot add the `crossorigin` attribute to the iframe, so the only solution is to disable the COEP header here.
// TODO: Re-enable COEP header when Google One Tap supports CORP header.

Check warning on line 81 in packages/core/src/middleware/koa-security-headers.ts

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/core/src/middleware/koa-security-headers.ts#L81

[no-warning-comments] Unexpected 'todo' comment: 'TODO: Re-enable COEP header when Google...'.
crossOriginEmbedderPolicy: false,
dnsPrefetchControl: false,
referrerPolicy: {
Expand All @@ -105,6 +105,9 @@
"'self'",
"'unsafe-inline'",
`${gsiOrigin}client`,
// Some of our users may use the Cloudflare Web Analytics service. We need to allow it to
// load its scripts.
'https://static.cloudflareinsights.com/',
...conditionalArray(!isProduction && "'unsafe-eval'"),
],
connectSrc: ["'self'", gsiOrigin, tenantEndpointOrigin, ...developmentOrigins],
Expand Down
Loading