build
build copied to clipboard
chore: fix cache headers for nodejs.org
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.