Nginx ingress controller rule to add a trailing slash to url without redirect

8/9/2021

The main problem client hasn't support redirection and can't generate URLs with trailing slash.

The backend uses openAPI and supports URLs only with a trailing slash. I am and kubernetes ingress in the middle. I can't change client or backend.

I am trying to rewrite the target URL on the ingress side, unfortunately, I couldn't find a solution without redirection.

I've tried solution from this case, but it generate 302 code Moved Temporarily and the client can't handle this redirection.

Is it possible to rewrite the URL on nginx ingress side without redirection?

-- user16628008
kubernetes
nginx
openapi
trailing-slash

0 Answers