I'm trying to send a header based on an environment variable and according to the documentation I'm supposed to use the env
condition.
However it is not working. This is my server configuration:
RewriteRule ([^\[]+)(?:\[immutable\].)js$ $1.js [NC,QSA,L,E=immutable]
Header set Cache-Control "immutable, no-transform, public, max-age=31536000" env=immutable
I have verified that if I remove env=immutable
, the header sends for all responses.
The expected result is:
foo.immutable.js
should servefoo.js
with the Cache-Control headerfoo.js
should also servefoo.js
but without the Cache-Control header
Any ideas as to why it is not working or if there's a way to dump out the environment in the ssl_access_log to debug?