frontend nginx: no-cache on index.html so deploys aren't masked by stale SPA shell (Edge heuristic caching)
Build and push images / validate (push) Successful in 3s
Build and push images / build-backend (push) Successful in 6s
Build and push images / build-worker (push) Successful in 5s
Build and push images / build-frontend (push) Successful in 10s

This commit is contained in:
2026-06-18 12:00:58 +01:00
parent 66076f2585
commit 385443522b
2 changed files with 16 additions and 0 deletions
+8
View File
@@ -7,6 +7,14 @@ server {
try_files $uri $uri/ /index.html; try_files $uri $uri/ /index.html;
} }
# Never let the browser serve a stale SPA shell: it references hashed asset
# filenames, so a cached index.html strands users on an old build after a
# deploy (Edge heuristically caches it when no Cache-Control is set). Force
# revalidation — a cheap 304 when unchanged — so new deploys are picked up.
location = /index.html {
add_header Cache-Control "no-cache";
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff2)$ { location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff2)$ {
expires 1y; expires 1y;
add_header Cache-Control "public, immutable"; add_header Cache-Control "public, immutable";
+8
View File
@@ -7,6 +7,14 @@ server {
try_files $uri $uri/ /index.html; try_files $uri $uri/ /index.html;
} }
# Never let the browser serve a stale SPA shell: it references hashed asset
# filenames, so a cached index.html strands users on an old build after a
# deploy (Edge heuristically caches it when no Cache-Control is set). Force
# revalidation — a cheap 304 when unchanged — so new deploys are picked up.
location = /index.html {
add_header Cache-Control "no-cache";
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff2)$ { location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff2)$ {
expires 1y; expires 1y;
add_header Cache-Control "public, immutable"; add_header Cache-Control "public, immutable";