Reputation: 309
I am using a
<If "%{HTTP:X-Some-Header-here} == 'yes'">
// Set some magic here
</If>
in my Apache (2.4) config.
This leads to a an "automatic" entry in the Vary: response header (if the stuff within the section applies) like
Vary: other stuff,X-Some-Header-here
Is there any simple way to deactivate this behaviour sine the X-Some-Header here is kind of "private" in my config?
I could do some magic with header rewriting but I hope there is a very simple directive to disable Apache to do this automatically.
Thanks :-)
Upvotes: 0
Views: 103
Reputation: 2220
Use req_novary.
As stated in the apache documentation:
req_novary: Same as req, but header names will not be added to the Vary header
Vary header is automatically applied for the following headers:
In your case, this would be something like:
<If "%{req_novary('X-Some-Header-here')} == 'yes'">
// Set some magic here
Note for RewriteCond you can also use the NC flag
Upvotes: 0