Available inall subroutines.
Removes all headers from the provided request, response, or cached object
variable, except for protected headers and those listed as parameters. This
function call is equivalent to using the
unset statement or the
header.unset function for every header except those listed as parameters.
Header names are not case sensitive.
Note that unlike
header names are passed as individual arguments rather than a single string
with header names separated by an equivalent to
The where argument is one of the literal identifiers
beresp, corresponding to the predefined
variable of the same
name. The predefined variable associated with the where argument must be
writable within the VCL subroutine where
header.filter_except() is called.
The headers arguments is a list of zero or more names of headers that will be kept on the provided where variable. Header names are ignored when they are not present on the provided where variable.
Some headers are protected. These headers cannot be modified, and are
See the Header reference
for which headers are protected.
header.filter_except() with the empty string, a not-set value, or a
string that would be invalid as a header name, is not permitted by the
The following example will remove all headers from the client response object except for the headers "Accept", "User-Agent", "Content-Type", and any protected headers.
header.filter_except(resp, "Accept", "User-Agent", "Content-Type");