fix(nginx): cache-control for index.html vs hashed assets
deploy / deploy (push) Successful in 1m45s
deploy / deploy (push) Successful in 1m45s
Prevents stale index.html referencing deleted asset hashes after frontend redeploys (white screen / partial load until hard refresh). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -62,7 +62,26 @@ server {
|
||||
proxy_buffering off;
|
||||
}
|
||||
|
||||
location = /ws/supervisor/funnel {
|
||||
set $platform_service http://platform-service:8000;
|
||||
proxy_pass $platform_service/ws/supervisor/funnel$is_args$args;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_read_timeout 3600s;
|
||||
proxy_send_timeout 3600s;
|
||||
}
|
||||
|
||||
location /assets/ {
|
||||
add_header Cache-Control "public, max-age=31536000, immutable" always;
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
location / {
|
||||
add_header Cache-Control "no-cache, no-store, must-revalidate" always;
|
||||
add_header Pragma "no-cache" always;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user