fix(docker): add no-cache header for species assets

SVG/JSON files under /species/ have no content hash in their filename,
so browsers could serve stale cached versions after updates. Adding
Cache-Control: no-cache forces revalidation on every request while
still allowing 304 Not Modified for unchanged files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Bastien ChanotandClaude Opus 4.6 committed 2026-05-27 03:55:06 +02:00
1 parent 0c170bd349
commit 53f62f7bf6
1 file changed
+5
+5
View File
@@ -16,6 +16,11 @@ server {
add_header Cache-Control "public, max-age=31536000, immutable"; add_header Cache-Control "public, max-age=31536000, immutable";
} }
# Species SVGs/JSON: always revalidate (no hash in filename)
location /species/ {
add_header Cache-Control "no-cache";
}
# SPA fallback — serve index.html for all non-file routes # SPA fallback — serve index.html for all non-file routes
location / { location / {
try_files $uri $uri/ /index.html; try_files $uri $uri/ /index.html;