Headers holds the headers middleware configuration.
This middleware manages the requests and responses headers.
More info: https://doc.traefik.io/traefik/v3.6/middlewares/http/headers/#customrequestheaders
accessControlAllowCredentials
boolean
AccessControlAllowCredentials defines whether the request can include user credentials.
accessControlAllowHeaders
[]string
AccessControlAllowHeaders defines the Access-Control-Request-Headers values sent in preflight response.
accessControlAllowMethods
[]string
AccessControlAllowMethods defines the Access-Control-Request-Method values sent in preflight response.
accessControlAllowOriginList
[]string
AccessControlAllowOriginList is a list of allowable origins. Can also be a wildcard origin "*".
accessControlAllowOriginListRegex
[]string
AccessControlAllowOriginListRegex is a list of allowable origins written following the Regular Expression syntax (https://golang.org/pkg/regexp/).
accessControlExposeHeaders
[]string
AccessControlExposeHeaders defines the Access-Control-Expose-Headers values sent in preflight response.
accessControlMaxAge
integer
AccessControlMaxAge defines the time that a preflight request may be cached.
format: int64
addVaryHeader
boolean
AddVaryHeader defines whether the Vary header is automatically added/updated when the AccessControlAllowOriginList is set.
allowedHosts
[]string
AllowedHosts defines the fully qualified list of allowed domain names.
browserXssFilter
boolean
BrowserXSSFilter defines whether to add the X-XSS-Protection header with the value 1; mode=block.
contentSecurityPolicy
string
ContentSecurityPolicy defines the Content-Security-Policy header value.
contentSecurityPolicyReportOnly
string
ContentSecurityPolicyReportOnly defines the Content-Security-Policy-Report-Only header value.
contentTypeNosniff
boolean
ContentTypeNosniff defines whether to add the X-Content-Type-Options header with the nosniff value.
customBrowserXSSValue
string
CustomBrowserXSSValue defines the X-XSS-Protection header value.
This overrides the BrowserXssFilter option.
customFrameOptionsValue
string
CustomFrameOptionsValue defines the X-Frame-Options header value.
This overrides the FrameDeny option.
customRequestHeaders
object
CustomRequestHeaders defines the header names and values to apply to the request.
customResponseHeaders
object
CustomResponseHeaders defines the header names and values to apply to the response.
featurePolicy
string
Deprecated: FeaturePolicy option is deprecated, please use PermissionsPolicy instead.
forceSTSHeader
boolean
ForceSTSHeader defines whether to add the STS header even when the connection is HTTP.
frameDeny
boolean
FrameDeny defines whether to add the X-Frame-Options header with the DENY value.
hostsProxyHeaders
[]string
HostsProxyHeaders defines the header keys that may hold a proxied hostname value for the request.
isDevelopment
boolean
IsDevelopment defines whether to mitigate the unwanted effects of the AllowedHosts, SSL, and STS options when developing.
Usually testing takes place using HTTP, not HTTPS, and on localhost, not your production domain.
If you would like your development environment to mimic production with complete Host blocking, SSL redirects,
and STS headers, leave this as false.
permissionsPolicy
string
PermissionsPolicy defines the Permissions-Policy header value.
This allows sites to control browser features.
publicKey
string
PublicKey is the public key that implements HPKP to prevent MITM attacks with forged certificates.
referrerPolicy
string
ReferrerPolicy defines the Referrer-Policy header value.
This allows sites to control whether browsers forward the Referer header to other sites.
sslForceHost
boolean
Deprecated: SSLForceHost option is deprecated, please use RedirectRegex instead.
sslHost
string
Deprecated: SSLHost option is deprecated, please use RedirectRegex instead.
sslProxyHeaders
object
SSLProxyHeaders defines the header keys with associated values that would indicate a valid HTTPS request.
It can be useful when using other proxies (example: "X-Forwarded-Proto": "https").
sslRedirect
boolean
Deprecated: SSLRedirect option is deprecated, please use EntryPoint redirection or RedirectScheme instead.
sslTemporaryRedirect
boolean
Deprecated: SSLTemporaryRedirect option is deprecated, please use EntryPoint redirection or RedirectScheme instead.
stsIncludeSubdomains
boolean
STSIncludeSubdomains defines whether the includeSubDomains directive is appended to the Strict-Transport-Security header.
stsPreload
boolean
STSPreload defines whether the preload flag is appended to the Strict-Transport-Security header.
stsSeconds
integer
STSSeconds defines the max-age of the Strict-Transport-Security header.
If set to 0, the header is not set.
format: int64
minimum: 0