Welcome! Log In Create A New Profile

Advanced

Handling upstream response 401

July 25, 2018 09:16AM
I have a problem that I thought I knew how to solve but must be just having a mind blank moment.

If the upstream server returns a 401 response I want to make sure Nginx serves the response. Right now it is serving the stale version. What happened is that the upstream page was public but then made secure, so it sends back the 401 redirect for browser login. Nginx is behaving properly in serving stale but I want to change how it works just for 401. We do serve stale for 404 because we don’t see a need to serve a fresh response every time for content that doesn’t exist.

An alternative is to force the upstream app to return 501 instead of 401 but my understanding is that there are technical issues at stake that force me to try to resolve in Nginx.

Any help would be appreciated, I just feel like it’s an obvious fix and I’m forgetting how.

___________________________________________
Michael Friscia
Office of Communications
Yale School of Medicine
(203) 737-7932 - office
(203) 931-5381 - mobile
http://web.yale.eduhttp://web.yale.edu/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Handling upstream response 401

wickedhangover July 25, 2018 09:16AM

Re: Handling upstream response 401

Maxim Dounin July 25, 2018 09:46AM

Re: Handling upstream response 401

wickedhangover July 25, 2018 09:56AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 300
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready