Skip to content

Commit 8b155b0

Browse files
childrentimeclaude
andcommitted
fix: add unsafe-eval to CSP for react-live code execution
react-live uses new Function() internally for live code preview, which requires 'unsafe-eval' in the script-src CSP directive. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 4cc9232 commit 8b155b0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

netlify.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,4 @@ X-Content-Type-Options = "nosniff"
7070
Referrer-Policy = "strict-origin-when-cross-origin"
7171
Strict-Transport-Security = "max-age=63072000; includeSubDomains; preload"
7272
Permissions-Policy = "camera=(self), microphone=(self), geolocation=(self)"
73-
Content-Security-Policy = "default-src 'self'; script-src 'self' 'unsafe-inline' https://www.googletagmanager.com https://www.clarity.ms https://cdn.jsdelivr.net; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://cdn.jsdelivr.net; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: https:; connect-src 'self' https://www.google-analytics.com https://*.algolia.net https://*.algolianet.com https://www.clarity.ms"
73+
Content-Security-Policy = "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://www.googletagmanager.com https://www.clarity.ms https://cdn.jsdelivr.net; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://cdn.jsdelivr.net; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: https:; connect-src 'self' https://www.google-analytics.com https://*.algolia.net https://*.algolianet.com https://www.clarity.ms"

0 commit comments

Comments
 (0)