From 5d490ac91e2b774d6c43162798d1b6f334c609bb Mon Sep 17 00:00:00 2001 From: Peter Foster Date: Sun, 22 Mar 2026 19:21:45 +0000 Subject: [PATCH] fix: CSS not loading due to CSP blocking onload inline event handler MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The media=print onload deferred CSS pattern requires unsafe-inline in script-src. When nonces replaced unsafe-inline in 14f1e53, the onload attribute was blocked by CSP, leaving main.min.css as media=print only so all below-fold styles were invisible. Fix: replace onload attribute with a nonce-tagged inline script that does the same media switch — CSP-safe. --- index.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index ece65c1..8a36ee1 100644 --- a/index.php +++ b/index.php @@ -142,8 +142,9 @@ $twitter_card_image = "https://ukaiautomation.co.uk/assets/images/ukaiautomation - - + + +