I know that I can add the User-Agent
to the Vary
http header with this line in my .htacess:
Header append Vary User-Agent
But how can I remove the User-Agent
from the Vary
header if it is already set?
According to the mod_headers doc there is an append
option, but no equivalent "remove" option.
Simple answer below, but you need some shenanigans to avoid sending an empty Vary: header (try to avoid it out of paranoia)
x-never-match can be any unlikely-to-ever-be-used header name.