diff --git a/.gitignore b/.gitignore index ceb9c6836..f770fde4c 100644 --- a/.gitignore +++ b/.gitignore @@ -22,7 +22,6 @@ dist-ssr *.njsproj *.sln *.sw? -public/config.js .env supabase/.temp/ coverage/ diff --git a/index.html b/index.html index 322587c6d..7bf0bd7b5 100644 --- a/index.html +++ b/index.html @@ -66,7 +66,6 @@ ] } - diff --git a/nginx.conf b/nginx.conf index 9774afca3..6161bffe1 100644 --- a/nginx.conf +++ b/nginx.conf @@ -18,12 +18,7 @@ server { if ($uri ~ ^/(app(?:/|$)|login$|share/)) { set $robots_tag "noindex, nofollow"; } add_header X-Robots-Tag $robots_tag always; - # Do not cache runtime bootstraps so config and theme behavior update instantly. - location = /config.js { - expires -1; - add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0"; - } - + # Do not cache the theme bootstrap so theme behavior updates instantly. location = /theme-init.js { expires -1; add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0"; @@ -84,10 +79,6 @@ server { # Cache JS/CSS bundles (Vite adds hashes to these, so caching is safe) location ~* \.(?:css|js)$ { - # But exclude config.js which we handled above - if ($request_uri ~* "config\.js") { - return 404; # Should not happen due to the = /config.js block above - } expires 1y; add_header Cache-Control "public"; } diff --git a/public/config.js b/public/config.js deleted file mode 100644 index 8cc59350b..000000000 --- a/public/config.js +++ /dev/null @@ -1,6 +0,0 @@ -// Runtime configuration for DebateLab -// Note: API keys are stored securely in the Supabase Edge Function -// This file only contains non-sensitive frontend configuration -window.env = { - // No API keys needed - all AI calls go through the authenticated Edge Function -}; \ No newline at end of file diff --git a/public/sw.js b/public/sw.js index bbc72146f..4dd9d86be 100644 --- a/public/sw.js +++ b/public/sw.js @@ -18,7 +18,6 @@ const APP_SHELL = [ '/app/history', '/app/settings', '/index.html', - '/config.js', '/theme-init.js', '/manifest.webmanifest', '/favicon.ico', diff --git a/src/test/vercel-deployment-config.test.ts b/src/test/vercel-deployment-config.test.ts index 6cfe5266f..de3434c4f 100644 --- a/src/test/vercel-deployment-config.test.ts +++ b/src/test/vercel-deployment-config.test.ts @@ -127,7 +127,7 @@ describe("Vercel frontend deployment configuration", () => { }, ); - it.each(["/index.html", "/config.js", "/theme-init.js", "/sw.js"])( + it.each(["/index.html", "/theme-init.js", "/sw.js"])( "prevents stale caching for %s", (source) => { const config = loadConfig(); diff --git a/vercel.json b/vercel.json index 343b031a9..d3d7ad814 100644 --- a/vercel.json +++ b/vercel.json @@ -84,15 +84,6 @@ } ] }, - { - "source": "/config.js", - "headers": [ - { - "key": "Cache-Control", - "value": "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0" - } - ] - }, { "source": "/theme-init.js", "headers": [