Add Prefix

    The AddPrefix middleware updates the URL Path of the request before forwarding it.

    Kubernetes

    1. # Prefixing with /foo
    2. apiVersion: traefik.containo.us/v1alpha1
    3. metadata:
    4. name: add-foo
    5. addPrefix:
    6. prefix: /foo

    Consul Catalog

    1. "traefik.http.middlewares.add-foo.addprefix.prefix": "/foo"
    2. }

    Rancher

    File (TOML)

    1. [http.middlewares]
    2. [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 ().