Welcome! Log In Create A New Profile

Advanced

Re: Handling upstream response 401

Maxim Dounin
July 25, 2018 09:46AM
Hello!

On Wed, Jul 25, 2018 at 01:14:29PM +0000, Friscia, Michael wrote:

> 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.

Are you sure you are seeng nginx returning a stale response on 401
from the upstream server?

With proxy_cache_use_stale you can configure nginx to return stale
responses on 500, 502, 503, 504, 403, 404, and 429 (see
http://nginx.org/r/proxy_cache_use_stale). It does not, however,
return stale responses on 401.

Either you've did something very strange in your configuration,
or you are trying to solve a problem which does not exist.

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
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: 132
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