style edit
This commit is contained in:
@@ -4,9 +4,17 @@ server {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
# SPA fallback
|
||||
# SPA fallback. index.html must always revalidate (no-cache = check the ETag on
|
||||
# every load) — without it browsers heuristically cache it and keep referencing
|
||||
# the PREVIOUS deploy's hashed bundles, forcing hard-refreshes after updates.
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
add_header Cache-Control "no-cache";
|
||||
}
|
||||
|
||||
# Hashed bundles are immutable — cache them hard.
|
||||
location /assets/ {
|
||||
add_header Cache-Control "public, max-age=31536000, immutable";
|
||||
}
|
||||
|
||||
# Proxy API calls to the server container (same Docker network).
|
||||
|
||||
Reference in New Issue
Block a user