prevent nginx from translate 303 responses (see other) to 302 (temporary redirect)

plrunner nginx-forum at forum.nginx.org
Mon Jan 22 14:34:40 UTC 2018


Hi,

I have an apache webserver in front of which I put my nginx 1.12.2 that is
running with a basic proxy_pass configuration. I have done this a million
times, even with more complex cofigurations.

Everything works perfectly except one thing I recently noticed:
the login phase consists of a POST request with the url-encoded credentials
in the body. In case of successful authentication, the webserver returns a
303 (See Other) to the user's home. What's worng is that when I authenticate
through nginx the POST requests gets back a 302 instead of a 303.
Despite this not being a problem when using a common browser, this becomes a
blocking issue when using a command line software suite that mandatorily
expects a 303.

I have already searched the documentation, but I got nothing about such
behaviour.
Any idea on how I can prevent nginx from "translating" that 303 into a 302?

Thanks in advance for any hint.
PL

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,278217,278217#msg-278217



More information about the nginx mailing list