Skip to main content

ReplacePath

Updating the path before forwarding the request.

The ReplacePath middleware will:

  • Replace the actual path with the specified one.
  • Store the original path in a X-Replaced-Path header.

Configuration Example

Replace the path with /foo
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: test-replacepath
spec:
replacePath:
path: /foo

Configuration Options

FieldDescription
pathThe path option defines the path to use as replacement in the request URL.