Redirect from application receiving wrong port from ingress

2020-02-14 nginx kubernetes-ingress nginx-ingress

We have an application which will redirect to This works fine without the ingress. When the ingress is added infront, it will instead change the redirect to https://hostname:80/redirected, which obviously is not desireable. SSL is not handled by the ingress itself- traffic comes in to the ingress on port 80 (http).

$ curl -vI
HTTP/1.1 301 Moved Permanently

What I want, is to just stop the ingress from changing anything in the location of redirects. Whatever response is sent from the backend applications, should just be propagated.

The only possible fix we've identified is to use the following annotations, which we would prefer to avoid since it's just an ugly workaround:

This was tested with nginx-ingress-controller 0.25.1 and 0.28.0

Big thanks for any help.