Konubinix' opinionated web of thoughts

Traefik Stripprefix

Fleeting

Traefik StripPrefix Documentation - Traefik

If your backend is serving assets (e.g., images or JavaScript files), it can use the X-Forwarded-Prefix header to properly construct relative URLs. Using the previous example, the backend should return /products/shoes/image.png (and not /image.png, which Traefik would likely not be able to associate with the same backend).

https://doc.traefik.io/traefik/middlewares/http/stripprefix/

forceSlash

forceSlash option ensures the resulting stripped path is not the empty string, by replacing it with / when necessary. This option was added to keep the initial (non-intuitive) behavior of this middleware, in order to avoid introducing a breaking change.

https://doc.traefik.io/traefik/middlewares/http/stripprefix/

recommended to explicitly set forceSlash to false.

https://doc.traefik.io/traefik/middlewares/http/stripprefix/