-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
It might help to add a non-dev configuration to the docs/README?
I know it's still pretty experimental, but Traefik v2.5 supports local plugins now (it's really hard to find documentation on it though):
- Local private plugins. traefik/traefik#8224
- https://traefik.io/blog/using-private-plugins-in-traefik-proxy-2-5/
You can then mount this into the Traefik container with docker-compose like so:
(static configuration)
command:
# This will be search for in /plugins-local/src/github.com/adyanth/header-transform
- "--experimental.localPlugins.header-transform.moduleName=github.com/adyanth/header-transform"
- "--providers.file.filename=/htransform-rules.yaml" +
http:
middlewares:
header-transform:
plugin:
# Plugin name here is the part after `experimental.localPlugins`
header-transform:
Rules:
- Rule:
Name: 'X-Client-Port Set'
Header: 'X-Client-Port'
Value: '^X-Forwarded-Port'
HeaderPrefix: "^"
Type: 'Set'
- Rule:
Name: 'X-SSL-Cert Set'
Header: 'X-SSL-Cert'
Value: '^X-Forwarded-Tls-Client-Cert'
HeaderPrefix: "^"
Type: 'Set'and
volumes:
- "./traefik/htransform-rules.yaml:/htransform-rules.yaml"
- "./traefik/header-transform:/plugins-local/src/github.com/adyanth/header-transform"Then you can simply add it to the middleware list for any http router as header-transform@file
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels