File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,12 +7,18 @@ const withBundleAnalyzer = bundleAnalyzer({
77
88const isDev = process . env . NODE_ENV === "development" ;
99
10+ // CSP is only sent in production builds (see headers() below). Third-party
11+ // checkout widgets must be allowlisted explicitly — default-src 'self' blocks
12+ // their scripts/iframes/fetches when frame-src/connect-src are omitted.
13+ // Turnstile: https://developers.cloudflare.com/turnstile/reference/content-security-policy/
1014const cspHeader = `
1115 default-src 'self';
12- script-src 'self' 'unsafe-eval' 'unsafe-inline';
13- style-src 'self' 'unsafe-inline';
16+ script-src 'self' 'unsafe-eval' 'unsafe-inline' https://challenges.cloudflare.com https://js.stripe.com https://va.vercel-scripts.com ;
17+ style-src 'self' 'unsafe-inline' https://challenges.cloudflare.com ;
1418 img-src 'self' blob: data: https:;
1519 font-src 'self' data:;
20+ connect-src 'self' https://challenges.cloudflare.com https://api.stripe.com https://vitals.vercel-insights.com;
21+ frame-src 'self' https://challenges.cloudflare.com https://js.stripe.com https://hooks.stripe.com;
1622 object-src 'none';
1723 base-uri 'self';
1824 form-action 'self';
You can’t perform that action at this time.
0 commit comments