ReplacePath
Replace the path of the request URL.
Docker
# Replace the path with /foo
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
name: test-replacepath
spec:
path: /foo
Consul Catalog
Marathon
"labels": {
"traefik.http.middlewares.test-replacepath.replacepath.path": "/foo"
}
File (YAML)
http:
test-replacepath:
replacePath:
path: "/foo"
File (TOML)
Configuration Options
- replace the actual path with the specified one.
- store the original path in a
X-Replaced-Path
header.
path
The path
option defines the path to use as replacement in the request URL.