Files
ingress/docs/content/middlewares/http/replacepath.md
T
zeekay ee53f0bd67 refactor: migrate CRD API groups to hanzo.ai and labels to ingress.*
- CRD API group: traefik.io -> hanzo.ai (GroupName, apiVersion, RBAC)
- Docker/provider label prefix: traefik.* -> ingress.* (all providers)
- CRD kind: TraefikService -> IngressService
- Directory renames: traefikio/ -> hanzoai/ (types, generated code, listers, informers, clientset)
- Config root name: traefik -> ingress (KV stores, file paths, env prefix)
- Metrics prefix: traefik_ -> ingress_
- Kubernetes annotations: traefik.ingress.kubernetes.io/ -> ingress.kubernetes.io/
- Gateway annotations: traefik.io/ -> hanzo.ai/
- Internal provider package: provider/traefik -> provider/builtins
- Type renames: TraefikLog -> IngressLog, TraefikCmdConfiguration -> IngressCmdConfiguration
- Generated client methods: TraefikV1alpha1() -> HanzoV1alpha1(), Traefik() -> Hanzo()
- Sample configs: traefik.sample.{toml,yml} -> ingress.sample.{toml,yml}
- Config paths: /etc/traefik/ -> /etc/ingress/, ~/.config/traefik -> ~/.config/ingress
- Default cert CN: TRAEFIK DEFAULT CERT -> INGRESS DEFAULT CERT
2026-02-26 10:33:54 -08:00

1.3 KiB

title, description
title description
Hanzo Ingress ReplacePath Documentation In Hanzo Ingress's HTTP middleware, ReplacePath updates paths before forwarding requests. Read the technical documentation.

ReplacePath

Updating the Path Before Forwarding the Request {: .subtitle }

Replace the path of the request URL.

Configuration Examples

# Replace the path with /foo
labels:
  - "traefik.http.middlewares.test-replacepath.replacepath.path=/foo"
# Replace the path with /foo
apiVersion: hanzo.ai/v1alpha1
kind: Middleware
metadata:
  name: test-replacepath
spec:
  replacePath:
    path: /foo
# Replace the path with /foo
- "traefik.http.middlewares.test-replacepath.replacepath.path=/foo"
# Replace the path with /foo
http:
  middlewares:
    test-replacepath:
      replacePath:
        path: "/foo"
# Replace the path with /foo
[http.middlewares]
  [http.middlewares.test-replacepath.replacePath]
    path = "/foo"

Configuration Options

General

The ReplacePath middleware will:

  • 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.