Skip to content

Commit 8ba153f

Browse files
ajitpratap0Ajit Pratap Singhclaude
authored
fix(website): add unsafe-inline to CSP script-src for Astro inline scripts (#375)
Astro generates inline <script> tags for component hydration, mobile menu toggle, stats animation, and tab switching. The CSP was blocking all of these, breaking interactivity on the live site. Co-authored-by: Ajit Pratap Singh <ajitpratapsingh@Ajits-Mac-mini-2655.local> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 402d8b8 commit 8ba153f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

website/src/layouts/BaseLayout.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const canonicalURL = new URL(Astro.url.pathname, Astro.site);
2929
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
3030
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@500;700&family=Instrument+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap">
3131
<link rel="dns-prefetch" href="https://img.shields.io">
32-
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-eval' 'wasm-unsafe-eval'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src https://fonts.gstatic.com; img-src 'self' https://img.shields.io https://goreportcard.com https://*.shields.io data:; connect-src 'self'">
32+
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src https://fonts.gstatic.com; img-src 'self' https://img.shields.io https://goreportcard.com https://*.shields.io data:; connect-src 'self'">
3333
<title>{title}</title>
3434
</head>
3535
<body class="min-h-screen flex flex-col">

0 commit comments

Comments
 (0)