Configure > Headers Directives
This document describes the configuration directives of the headers handler.
- Description:
-
Adds a new header line to the response headers, regardless if a header with the same name already exists.
Example. Setting theSet-Cookie
headerheader.add: "Set-Cookie: test=1"
- Level:
- global, host, path, extension
- Description:
-
Adds a new header line, or appends the value to the existing header with the same name, separated by
,
. - Level:
- global, host, path, extension
- Description:
-
Adds a new header line, or merges the value to the existing header of comma-separated values.
The following example sets the
must-revalidate
attribute of theCache-Control
header when and only when the attribute is not yet being set.Example. Setting themust-revalidate
attributeheader.merge: "Cache-Control: must-revalidate"
- Level:
- global, host, path, extension
- Description:
-
Sets a header line, removing headers with the same name if exists.
Example. Setting theX-Content-Type-Options: nosniff
headerheader.set: "X-Content-Type-Options: nosniff"
- Level:
- global, host, path, extension
- Description:
-
Sets a header line when and only when a header with the same name does not already exist.
- Level:
- global, host, path, extension
- Description:
-
Removes headers with given name.
Example. Removing theX-Powered-By
headerheader.unset: "X-Powered-By"
- Level:
- global, host, path, extension