Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ dist-ssr
*.njsproj
*.sln
*.sw?
public/config.js
.env
supabase/.temp/
coverage/
Expand Down
1 change: 0 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
]
}
</script>
<script src="/config.js"></script>
<script src="/theme-init.js"></script>
</head>

Expand Down
11 changes: 1 addition & 10 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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";
}
Expand Down
6 changes: 0 additions & 6 deletions public/config.js

This file was deleted.

1 change: 0 additions & 1 deletion public/sw.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const APP_SHELL = [
'/app/history',
'/app/settings',
'/index.html',
'/config.js',
'/theme-init.js',
'/manifest.webmanifest',
'/favicon.ico',
Expand Down
2 changes: 1 addition & 1 deletion src/test/vercel-deployment-config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
9 changes: 0 additions & 9 deletions vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
Loading