Compare commits

..

No commits in common. "674dccca4ec7dfbd2b5860a0eee79ae0a2f22062" and "908cf8a62d66f325de47dc8dd86c9995f9607dc4" have entirely different histories.

View file

@ -18,17 +18,16 @@ server {
# Root location - serve static files
root /usr/share/nginx/html;
# Fonts, icons, images: rarely change, safe to cache aggressively.
location ~* \.(png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
# Cache static assets aggressively
location ~* \.(css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
expires 1y;
add_header Cache-Control "public, immutable";
}
# CSS / JS must revalidate so a redeploy is picked up immediately.
# The index.html links these without a version query string, so without
# this rule a stale stylesheet/script sits in the browser cache forever
# (which produced the unstyled calendar that triggered this fix).
location ~* \.(css|js)$ {
# JS files must revalidate so a redeploy is picked up immediately.
# The static index.html links api.js with a ?v=N query string anyway,
# but defence-in-depth: never let a stale .js sit in a browser cache.
location ~* \.js$ {
expires -1;
add_header Cache-Control "no-cache, must-revalidate";
}