Skip to main content

AddPrefix

Diagram showing how "/foo" is added as prefix.

The AddPrefix middleware updates the path of a request before forwarding it.


Configuration Options

FieldDescriptionRequired
prefixprefix is the string to add before the current path in the requested URL. It should include a leading slash (/).Yes

Example

Prefixing with /foo
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: add-foo
spec:
addPrefix:
prefix: /foo