Skip to content

Commit

Permalink
Revert to original CSP
Browse files Browse the repository at this point in the history
  • Loading branch information
ken-matsui committed Dec 27, 2023
1 parent 71290bb commit 1668104
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ export function middleware(request: NextRequest) {
// script-src 'self' 'nonce-${nonce}' 'strict-dynamic' static.cloudflareinsights.com ${
// IS_DEV ? "'unsafe-eval'" : ""
// };
// style-src 'self' 'nonce-${nonce}';

const cspHeader = `
default-src 'self';
style-src 'self' 'nonce-${nonce}';
script-src 'self' 'strict-dynamic' static.cloudflareinsights.com 'unsafe-inline' ${
IS_DEV ? "'unsafe-eval'" : ""
}
script-src 'self' 'unsafe-inline' static.cloudflareinsights.com ${
IS_DEV ? "va.vercel-scripts.com 'unsafe-eval'" : ""
};
style-src 'self' 'unsafe-inline';
connect-src 'self' vitals.vercel-insights.com;
img-src 'self' blob: data:;
font-src 'self';
Expand Down

0 comments on commit 1668104

Please sign in to comment.