Documentation Index
Fetch the complete documentation index at: https://mintlify.com/traefik/traefik/llms.txt
Use this file to discover all available pages before exploring further.
Headers Middleware
Managing Request/Response Headers The Headers middleware manages the headers of requests and responses. A set of forwarded headers are automatically added by default.Configuration Examples
Adding Headers to Request and Response
Security Headers
CORS Headers
Configuration Options
Custom Headers
Header names and values to apply to the request.
Header names and values to apply to the response.
CORS Headers
Indicates whether the request can include user credentials.
Header field names that can be used as part of the request.
Methods that can be used during requests.
List of allowed origins. A wildcard origin
* can also be configured.Regular expressions for allowed origins.
Headers that are safe to expose to the API of a CORS API specification.
How many seconds a preflight request can be cached.
Add or modify the Vary header to demonstrate that server responses can differ based on the origin header.
Security Headers
Max-age of the Strict-Transport-Security header. If set to 0, the header is not set.
Add includeSubDomains directive to Strict-Transport-Security header.
Add preload flag to Strict-Transport-Security header.
Add STS header even when the connection is HTTP.
Add X-Frame-Options header with the value of DENY.
Set custom value for X-Frame-Options header (overrides frameDeny).
Add X-Content-Type-Options header with the value nosniff.
Add X-XSS-Protection header with the value 1; mode=block.
Set Content-Security-Policy header value.
Control whether browsers forward the Referer header to other sites.
Control browser features.