Skip to content

Commit becc261

Browse files
Slashgearclaude
andcommitted
fix: allow inline scripts in CSP for JSON-LD structured data
Add 'unsafe-inline' to script-src CSP directive to prevent browser errors on application/ld+json script tags. Nonce-based approach is not viable as it forces dynamic rendering. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f7617b7 commit becc261

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

next.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ const nextConfig: NextConfig = {
7272
key: 'Content-Security-Policy',
7373
value: [
7474
"default-src 'none'",
75-
"script-src 'self'",
75+
"script-src 'self' 'unsafe-inline'",
7676
"img-src 'self' https://secure-content.meetupstatic.com/ https://images.ctfassets.net/ https://assets.vercel.com/ https://secure.meetupstatic.com/ https://img.youtube.com/",
7777
"style-src 'self' 'unsafe-inline'",
7878
'frame-src https://www.youtube.com/',

0 commit comments

Comments
 (0)