Skip to content

Plugin Rewrite Response Headers Middleware

Appears in

  • .Values.middlewares.$name.data

pluginName

Define the pluginName

Keymiddlewares.$name.data.pluginName
Typestring
Required
Helm tpl
DefaultrewriteResponseHeaders

Example

middlewares:
middleware-name:
data:
pluginName: my-plugin-name

rewrites

Define the rewrites

Keymiddlewares.$name.data.rewrites
Typelist of map
Required
Helm tpl
Default-

Example

middlewares:
middleware-name:
data:
rewrites:
- header: some-header
regex: some-regex
replacement: some-replacement

rewrites[].header

Define the header

Keymiddlewares.$name.data.rewrites.header
Typestring
Required
Helm tpl
Default-

Example

middlewares:
middleware-name:
data:
rewrites:
- header: some-header

rewrites[].regex

Define the regex

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

Example

middlewares:
middleware-name:
data:
rewrites:
- regex: some-regex

rewrites[].replacement

Define the replacement

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

Example

middlewares:
middleware-name:
data:
rewrites:
- replacement: some-replacement

Full Examples

middlewares:
middleware-name:
enabled: true
type: plugin-rewrite-response-headers
data:
pluginName: my-plugin-name
rewrites:
- header: some-header
regex: some-regex
replacement: some-replacement
- header: some-other-header
regex: some-other-regex
replacement: some-other-replacement