Hi, I am currently wondering, why traefik is not able to re add prefixes from the PathPrefixStrip
to backend responses.
I suspect there is a meaning behind this, but I can't see which one. This is from the v2 documentation:
If your backend is serving assets (e.g., images or Javascript files), chances are it must return properly constructed relative URLs. Continuing on the example, the backend should return
/products/shoes/image.png
(and not/images.png
which Traefik would likely not be able to associate with the same backend).
That is what is confusing me: Why is Traefik designed in such a way that the backend has to return a path that includes the prefix?
Background why I am asking: I want to map certain path prefixes on the same host to certain docker containers. This does not work with backend redirects. An example is Grafana.
Configuring a path prefix for "/grafana/" and calling "/grafana" itself works, but then Grafana redirects to "/login" which is not correct. I'd need "/grafana/login" and so on, you get the picture.
So again, why is the system designed that way? I will happily change my approach if someone tells me I am not doing it the way id is supposed to be done.
Thanks