build icon indicating copy to clipboard operation
build copied to clipboard

chore: fix cache headers for nodejs.org

Open MattIPv4 opened this issue 2 years ago • 1 comments
trafficstars

As noted in http://nginx.org/en/docs/http/ngx_http_headers_module.html#add_header, add_header directives are only inherited from parent levels when add_header is not used in the current level.

curl -sI https://node-js-origin/download/release/latest/node-v20.5.0.tar.gz | grep cache-control

curl -sI https://node-js-origin/dist/latest/node-v20.5.0.tar.gz | grep cache-control            
cache-control: public, max-age=3600, s-maxage=14400

There are some blocks that use add_header, so we need to set the cache header again as it will not be inherited otherwise.

MattIPv4 avatar Jul 31 '23 21:07 MattIPv4