diff --git a/worker.js b/worker.js index 3957167..9f7b46f 100644 --- a/worker.js +++ b/worker.js @@ -6,6 +6,13 @@ addEventListener('fetch', event => { async function handleRequest(request) { const url = new URL(request.url); + // Serve PWA manifest + if (url.pathname === '/manifest.json') { + return new Response(getPWAManifest(), { + headers: { 'Content-Type': 'application/json' } + }); + } + // Serve the main HTML page if (url.pathname === '/' || url.pathname === '') { return new Response(getMainHTML(), { @@ -178,6 +185,11 @@ function getMainHTML() {