Task 9d121e76: Reverse proxy and TLS for the API (#214)

This commit was merged in pull request #214.
This commit is contained in:
2026-09-24 08:00:04 -04:00
parent 9b068926a9
commit f6d222764c
104 changed files with 19763 additions and 185 deletions
+13
View File
@@ -0,0 +1,13 @@
/**
* Service worker registration for the installable admin PWA.
* Registers /sw.js only in production builds, so dev servers and tests never
* run a worker. Failures are logged, never thrown — the app works without it.
*/
export async function registerServiceWorker(): Promise<void> {
if (!import.meta.env.PROD || !("serviceWorker" in navigator)) return;
try {
await navigator.serviceWorker.register("/sw.js", { scope: "/" });
} catch (error) {
console.error("Service worker registration failed:", error);
}
}