nginx `proxy_redirect` in traefik (redirect without changing url) nginx `proxy_redirect` in traefik (redirect without changing url) nginx nginx

nginx `proxy_redirect` in traefik (redirect without changing url)


In Traefik, that redirect label is for interaction with client (sending your browser to another location)

I am still trying to figure out what is the exact replacement for proxy_redirect. As per Nginx docs, this directive:

Sets the text that should be changed in the “Location” and “Refresh” header fields of a proxied server response.

So in docker-compose.yaml those two header fields could be placed like this:

labels:  - "traefik.frontend.headers.customResponseHeaders=Location:value1||Refresh:value1"

But I'm not sure how to replace them with regex. Maybe there is a more "traefikal" approach out there.

I know this isn't a real answer, but I can't post a comment due to my low points.

I found your question while looking for a solution for Jenkins behind Traefik SSL.