Add Prefix
The AddPrefix middleware updates the URL Path of the request before forwarding it.
Kubernetes
# Prefixing with /foo
apiVersion: traefik.containo.us/v1alpha1
metadata:
name: add-foo
addPrefix:
prefix: /foo
Consul Catalog
"traefik.http.middlewares.add-foo.addprefix.prefix": "/foo"
}
Rancher
File (TOML)
[http.middlewares]
[http.middlewares.add-foo.addPrefix]
Configuration Options
prefix
is the string to add before the current path in the requested URL. It should include the leading slash ().