ReplacePath

    Replace the path of the request URL.

    Docker

    1. # Replace the path with /foo
    2. apiVersion: traefik.containo.us/v1alpha1
    3. kind: Middleware
    4. name: test-replacepath
    5. spec:
    6. path: /foo

    Consul Catalog

    Marathon

    1. "labels": {
    2. "traefik.http.middlewares.test-replacepath.replacepath.path": "/foo"
    3. }

    File (YAML)

    1. http:
    2. test-replacepath:
    3. replacePath:
    4. 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.