proxy-nginx/nginx-config/https-prepare-to-cache/snippets/static-cache.conf

11 lines
301 B
Plaintext

proxy_cache static_cache;
proxy_cache_key "$scheme://$host$request_uri";
proxy_cache_valid 200 301 302 7d;
proxy_cache_valid 404 1m;
proxy_cache_use_stale error timeout updating;
proxy_cache_lock on;
proxy_cache_revalidate on;
expires 1y;
access_log off;
add_header Cache-Control "public, immutable";