Hi,
I am using nginx as the ingress controller in my cluster. My auth-request setup looks like below:
CLIENT ---> nginx ---> auth_server ----(200)---> original request
auth_server ---- (401)---> login page
I am using nginx-ingress annotations to acheive this.
But, I have a special requirement:
when proxying the request to authentication server, nginx has to add a custom header towards the auth_server, i.e, I must be able to read the header inside the auth-server service.
OR
When the authentication inside the auth_server fails, auth_server will add a custom-header to the response back to nginx-ingress. I want to read this header and set the value of the header as a parameter for request towards login page.
Is this possible to acheive using nginx-ingress annotations?
Thanks.