On Thu, Nov 21, 2013 at 6:13 AM, Reindl Harald <[email protected]> wrote: > <VirtualHost IP_ADDR:443> > <IfModule mod_headers.c> > Header set "Strict-Transport-Security" "max-age=31536000" > </IfModule> > </VirtualHost> > > in case of a 404 error all mod_headers defined headers are missing > not only the ones defined inside VirtualHost > > * X-DNS-Prefetch-Control > * X-Content-Type-Options > * Strict-Transport-Security >
The optional condition argument determines which internal table of responses headers this directive will operate against. Other components of the server may have stored their response headers in either the table that corresponds to onsuccess or the table that corresponds to always. "Always" in this context refers to whether headers you add will be sent during both a successful and unsucessful response, but if your action is a function of an existing header, you will have to read on for further complications. The default value of onsuccess may need to be changed to always under the circumstances similar to those listed below. Note also that repeating this directive with both conditions makes sense in some scenarios because always is not a superset of onsuccess with respect to existing headers: You're adding a header to a non-success (non-2xx) response, such as a redirect, in which case only the table corresponding to always is used in the ultimate response. You're modifying or removing a header generated by a CGI script, in which case the CGI scripts are in the table corresponding to always and not in the default table. You're modifying or removing a header generated by some piece of the server but that header is not being found by the default onsuccess condition.
