Fix CSP violations and font 404 from Cloudflare Radar scan
Two conflicting <meta> CSP tags in index.html (plus a separate _headers policy) meant the browser enforced their intersection, which blocked the Cloudflare Insights beacon script and its inline bootstrap. k5bss.html had the same gap in its own CSP. Consolidated to one consistent policy per surface that allows static.cloudflareinsights.com / cloudflareinsights.com, and moved index.html's inline script and onerror handler into js/main.js so script-src no longer needs 'unsafe-inline' there. Also added the missing fonts/ibm-plex-mono-400.woff2 that style.css has referenced since it was wired up, which was 404ing. Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
1 parent
8c665ba239
commit
9dd8fae16e
5 files changed
+28
-23
No files matched your search
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Content-Security-Policy: default-src 'self'; script-src 'self'; style-src 'self' https://fonts.googleapis.com 'unsafe-inline'; font-src 'self' https://fonts.gstatic.com; img-src 'self' data:; connect-src 'self'; object-src 'none'; base-uri 'none'; frame-ancestors 'none'; form-action 'self'; upgrade-insecure-requests
|
||||
Content-Security-Policy: default-src 'self'; script-src 'self' https://static.cloudflareinsights.com; style-src 'self' https://fonts.googleapis.com 'unsafe-inline'; font-src 'self' https://fonts.gstatic.com; img-src 'self' data:; connect-src 'self' https://cloudflareinsights.com; object-src 'none'; base-uri 'none'; frame-ancestors 'none'; form-action 'self'; upgrade-insecure-requests
|
||||
X-Content-Type-Options: nosniff
|
||||
X-Frame-Options: DENY
|
||||
Referrer-Policy: strict-origin-when-cross-origin
|
||||
|
||||
Reference in new issue
Block a user