Safe3-openresty-manager/nginx/conf/cache.conf
UUSEC Technology 12467d8fd1 open source
2025-04-30 13:05:17 +08:00

17 lines
No EOL
790 B
Text

location ~* ^.*\.(css|js|jpe?g|gif|png|webp|woff|woff2|eot|ttf|svg|ico|css\.map|js\.map)$ {
proxy_cache cache_zone;
proxy_set_header Range $http_range;
proxy_set_header If-Range $http_if_range;
proxy_cache_key $scheme$host$request_uri$http_range;
proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;
proxy_cache_bypass $http_pragma $http_authorization;
proxy_no_cache $http_pragma $http_authorization;
proxy_cache_valid 200 302 10m;
proxy_cache_valid 301 1h;
proxy_cache_valid any 1m;
add_header X-NGX-Cache $upstream_cache_status;
access_log off;
include proxy.conf;
}