Skip to content

Headers Middleware

Appears in

  • .Values.middlewares.$name.data

customRequestHeaders

Define the customRequestHeaders

Keymiddlewares.$name.data.customRequestHeaders
Typemap
Required
Helm tpl
Default-

Example

middlewares:
middleware-name:
data:
customRequestHeaders:
some-name: some-value
some-other-name: some-other-value

customResponseHeaders

Define the customResponseHeaders

Keymiddlewares.$name.data.customResponseHeaders
Typemap
Required
Helm tpl
Default-

Example

middlewares:
middleware-name:
data:
customResponseHeaders:
some-name: some-value
some-other-name: some-other-value

accessControlAllowCredentials

Define the accessControlAllowCredentials

Keymiddlewares.$name.data.accessControlAllowCredentials
Typebool
Required
Helm tpl
Default-

Example

middlewares:
middleware-name:
data:
accessControlAllowCredentials: true

accessControlAllowHeaders

Define the accessControlAllowHeaders

Keymiddlewares.$name.data.accessControlAllowHeaders
Typelist of string
Required
Helm tpl
Default-

Example

middlewares:
middleware-name:
data:
accessControlAllowHeaders:
- some-header
- some-other-header

accessControlAllowMethods

Define the accessControlAllowMethods

Keymiddlewares.$name.data.accessControlAllowMethods
Typelist of string
Required
Helm tpl
Default-

Example

middlewares:
middleware-name:
data:
accessControlAllowMethods:
- GET
- POST
- PUT
- DELETE

accessControlAllowOriginList

Define the accessControlAllowOriginList

Keymiddlewares.$name.data.accessControlAllowOriginList
Typelist of string
Required
Helm tpl
Default-

Example

middlewares:
middleware-name:
data:
accessControlAllowOriginList:
- some-origin
- some-other-origin

accessControlAllowOriginListRegex

Define the accessControlAllowOriginListRegex

Keymiddlewares.$name.data.accessControlAllowOriginList
Typelist of string
Required
Helm tpl
Default-

Example

middlewares:
middleware-name:
data:
accessControlAllowOriginListRegex:
- some-origin-regex
- some-other-origin-regex

accessControlExposeHeaders

Define the accessControlExposeHeaders

Keymiddlewares.$name.data.accessControlExposeHeaders
Typelist of string
Required
Helm tpl
Default-

Example

middlewares:
middleware-name:
data:
accessControlExposeHeaders:
- some-header
- some-other-header

accessControlMaxAge

Define the accessControlMaxAge

Keymiddlewares.$name.data.accessControlMaxAge
Typeint
Required
Helm tpl
Default-

Example

middlewares:
middleware-name:
data:
accessControlMaxAge: 1000

addVaryHeader

Define the addVaryHeader

Keymiddlewares.$name.data.addVaryHeader
Typebool
Required
Helm tpl
Default-

Example

middlewares:
middleware-name:
data:
addVaryHeader: true

allowedHosts

Define the allowedHosts

Keymiddlewares.$name.data.allowedHosts
Typelist of string
Required
Helm tpl
Default-

Example

middlewares:
middleware-name:
data:
allowedHosts:
- some-host
- some-other-host

hostsProxyHeaders

Define the hostsProxyHeaders

Keymiddlewares.$name.data.hostsProxyHeaders
Typelist of string
Required
Helm tpl
Default-

Example

middlewares:
middleware-name:
data:
hostsProxyHeaders:
- some-header
- some-other-header

sslProxyHeaders

Define the sslProxyHeaders

Keymiddlewares.$name.data.sslProxyHeaders
Typemap
Required
Helm tpl
Default-

Example

middlewares:
middleware-name:
data:
sslProxyHeaders:
some-header: some-value
some-other-header: some-other-value

stsSeconds

Define the stsSeconds

Keymiddlewares.$name.data.stsSeconds
Typeint
Required
Helm tpl
Default-

Example

middlewares:
middleware-name:
data:
stsSeconds: 1000

stsIncludeSubdomains

Define the stsIncludeSubdomains

Keymiddlewares.$name.data.stsIncludeSubdomains
Typebool
Required
Helm tpl
Default-

Example

middlewares:
middleware-name:
data:
stsIncludeSubdomains: true

stsPreload

Define the stsPreload

Keymiddlewares.$name.data.stsPreload
Typebool
Required
Helm tpl
Default-

Example

middlewares:
middleware-name:
data:
stsPreload: true

forceSTSHeader

Define the forceSTSHeader

Keymiddlewares.$name.data.forceSTSHeader
Typebool
Required
Helm tpl
Default-

Example

middlewares:
middleware-name:
data:
forceSTSHeader: true

frameDeny

Define the frameDeny

Keymiddlewares.$name.data.frameDeny
Typebool
Required
Helm tpl
Default-

Example

middlewares:
middleware-name:
data:
frameDeny: true

customFrameOptionsValue

Define the customFrameOptionsValue

Keymiddlewares.$name.data.customFrameOptionsValue
Typestring
Required
Helm tpl
Default-

Example

middlewares:
middleware-name:
data:
customFrameOptionsValue: some-value

contentTypeNosniff

Define the contentTypeNosniff

Keymiddlewares.$name.data.contentTypeNosniff
Typebool
Required
Helm tpl
Default-

Example

middlewares:
middleware-name:
data:
contentTypeNosniff: true

browserXssFilter

Define the browserXssFilter

Keymiddlewares.$name.data.browserXssFilter
Typebool
Required
Helm tpl
Default-

Example

middlewares:
middleware-name:
data:
browserXssFilter: true

customBrowserXSSValue

Define the customBrowserXSSValue

Keymiddlewares.$name.data.customBrowserXSSValue
Typestring
Required
Helm tpl
Default-

Example

middlewares:
middleware-name:
data:
customBrowserXSSValue: some-value

contentSecurityPolicy

Define the contentSecurityPolicy

Keymiddlewares.$name.data.contentSecurityPolicy
Typestring
Required
Helm tpl
Default-

Example

middlewares:
middleware-name:
data:
contentSecurityPolicy: some-value

contentSecurityPolicyReportOnly

Define the contentSecurityPolicyReportOnly

Keymiddlewares.$name.data.contentSecurityPolicy
Typebool
Required
Helm tpl
Default-

Example

middlewares:
middleware-name:
data:
contentSecurityPolicyReportOnly: true

publicKey

Define the publicKey

Keymiddlewares.$name.data.publicKey
Typestring
Required
Helm tpl
Default-

Example

middlewares:
middleware-name:
data:
publicKey: some-public-key

referrerPolicy

Define the referrerPolicy

Keymiddlewares.$name.data.referrerPolicy
Typestring
Required
Helm tpl
Default-

Example

middlewares:
middleware-name:
data:
referrerPolicy: some-referrer-policy

permissionsPolicy

Define the permissionsPolicy

Keymiddlewares.$name.data.permissionsPolicy
Typestring
Required
Helm tpl
Default-

Example

middlewares:
middleware-name:
data:
permissionsPolicy: some-permissions-policy

isDevelopment

Define the isDevelopment

Keymiddlewares.$name.data.isDevelopment
Typebool
Required
Helm tpl
Default-

Example

middlewares:
middleware-name:
data:
isDevelopment: true

Full Examples

middlewares:
middleware-name:
enabled: true
type: headers
data:
customRequestHeaders:
some-name: some-value
some-other-name: some-other-value
customResponseHeaders:
some-name: some-value
some-other-name: some-other-value
accessControlAllowCredentials: true
accessControlAllowHeaders:
- some-header
- some-other-header
accessControlAllowMethods:
- GET
- DELETE
accessControlAllowOriginList:
- some-origin
- some-other-origin
accessControlAllowOriginListRegex:
- some-origin-regex
- some-other-origin-regex
accessControlExposeHeaders:
- some-header
- some-other-header
accessControlMaxAge: 1000
addVaryHeader: true
allowedHosts:
- some-host
- some-other-host
hostsProxyHeaders:
- some-header
- some-other-header
sslProxyHeaders:
some-header: some-value
some-other-header: some-other-value
stsSeconds: 1000
stsIncludeSubdomains: true
stsPreload: true
forceSTSHeader: true
frameDeny: true
customFrameOptionsValue: some-value
contentTypeNosniff: true
browserXssFilter: true
customBrowserXSSValue: some-value
contentSecurityPolicy: some-value
contentSecurityPolicyReportOnly: true
publicKey: some-public-key
referrerPolicy: some-referrer-policy
permissionsPolicy: some-permissions-policy
isDevelopment: true