Middleware¶
prefix-removing¶
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: my-server-stripprefix
namespace: test
spec:
stripPrefix:
prefixes:
- "/my-prefix"
Useful when we have multiple services running behind Traefik,
It can simplify backend service configuration by allowing the service to assume a clean path structure regardless of the actual routing prefix used by Traefik.
It can improve code maintainability if backend code expects a specific URL structure that might be different from the public-facing path.