From c7a10ae71906680d14e62b25c702ac21e5067a7f Mon Sep 17 00:00:00 2001 From: Justin Date: Sun, 30 Aug 2026 16:28:33 -0500 Subject: [PATCH] Fix CSP violations from Cloudflare Radar scan Two duplicate CSP tags in index.html conflicted with the _headers HTTP header, and browsers enforce the intersection of all active policies. That blocked the profile photo, the inline nav- highlight script, and the Cloudflare Insights beacon. Consolidate to a single CSP in _headers, allow the actual external resources the page needs (ki5bhv.com image, cloudflareinsights.com beacon), and move the inline script/onerror handler into js/main.js so script-src no longer needs 'unsafe-inline'. Co-Authored-By: Claude Sonnet 5 --- _headers | 2 +- index.html | 24 ++---------------------- js/main.js | 23 +++++++++++++++++++++++ 3 files changed, 26 insertions(+), 23 deletions(-) create mode 100644 js/main.js diff --git a/_headers b/_headers index 41da39e..e318e97 100644 --- a/_headers +++ b/_headers @@ -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' https://ki5bhv.com 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 diff --git a/index.html b/index.html index 6ea86bc..c03f438 100755 --- a/index.html +++ b/index.html @@ -6,9 +6,6 @@ - - Justin Frasier | Infrastructure Administrator @@ -27,8 +24,7 @@