Private
Public Access
Fix CSP blocking the service worker registration and tag colors
script-src 'self' blocks any inline <script> block outright, which would have silently broken the service-worker registration snippet in base.html in production — the exact feature this whole project exists to support. Moved it to static/js/register-sw.js, loaded via <script src>, so script-src can stay strict with no 'unsafe-inline' exception. style-src needed 'unsafe-inline' regardless, since tag pills set a per-tag color via a dynamic inline style attribute. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3f6474ce94
commit
4c20558525
4 files changed
+13
-9
No files matched your search
@@ -0,0 +1,5 @@
|
||||
if ("serviceWorker" in navigator) {
|
||||
window.addEventListener("load", () => {
|
||||
navigator.serviceWorker.register("/sw.js");
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user