Return response from nginx-auth-url to the client request

9/16/2019

I am using nginx.ingress.kubernetes.io/auth-url annotation to secure authentication for my ingress objects. If this URL returns 200, then my original request is properly displayed. If there is any other error, then I see internal server error in the browser. I used nginx.ingress.kubernetes.io/auth-signin annotation to specify the error location, but I have many such ingress objects and the auth-signin URL could vary for each ingress object. Basically, my "auth-url" service can define the "auth-signin" for each nginx object dynamically. Is it possible to set a configuration snippet using nginx.ingress.kubernetes.io/auth-snippet to indicate my ingress to return any error back to the client (instead of returning internal server error)? like it does in traefik. In that way I can perform http-redirect the response from "auth-url" service to the dynamic "auth-signin" URL using http.seeOther.

-- sumanth joel
kubernetes
nginx
nginx-ingress
traefik

0 Answers