Skip to content

Commit 8ca0539

Browse files
committed
Website: avoid aggressive caching
1 parent 52980ae commit 8ca0539

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

apps/website/nginx.conf

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,19 @@ server {
1717
add_header Cache-Control "public, immutable";
1818
}
1919

20-
# HTML files - cache but revalidate
20+
# HTML files - always revalidate to pick up new asset hashes
2121
location ~* \.html$ {
22-
expires 1h;
23-
add_header Cache-Control "public, must-revalidate";
22+
add_header Cache-Control "no-cache";
23+
}
24+
25+
# JSON data files (like latest.json) - revalidate frequently
26+
location ~* \.json$ {
27+
add_header Cache-Control "public, max-age=60";
2428
}
2529

2630
# SPA fallback - serve index.html for all routes
2731
location / {
32+
add_header Cache-Control "no-cache";
2833
try_files $uri $uri/ /index.html;
2934
}
3035

0 commit comments

Comments
 (0)