From 85003cd4372475b9cae973b74261a6ca3f61af0d Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Mon, 16 Mar 2026 20:57:00 +0000 Subject: fix: serve sw.js from /api/push/sw.js to bypass Apache static file routing Apache fronts the Go service and only proxies /api/ paths; /sw.js hits Apache's filesystem and 404s. Serve the service worker from /api/push/sw.js with Service-Worker-Allowed: / so the browser allows it to control the full origin scope. Update SW registration URL. Co-Authored-By: Claude Sonnet 4.6 --- web/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web/app.js') diff --git a/web/app.js b/web/app.js index cdc0da3..d0ff0f4 100644 --- a/web/app.js +++ b/web/app.js @@ -2598,7 +2598,7 @@ function renderStatsPanel(tasks, executions) { async function registerServiceWorker() { if (!('serviceWorker' in navigator) || !('PushManager' in window)) return null; - return navigator.serviceWorker.register('/sw.js'); + return navigator.serviceWorker.register('/api/push/sw.js', { scope: '/' }); } function urlBase64ToUint8Array(base64String) { -- cgit v1.2.3