nginx http auth module query

Maxim Dounin mdounin at
Fri Feb 17 11:26:24 UTC 2012


On Fri, Feb 17, 2012 at 03:57:50AM -0500, karanj wrote:

> One additional question here -
> In this as I understand it redirects to error_page on receiving a 4xx
> status code. Is it possible that nginx reads the value of error page
> from a custom header which comes along with the response (with 4xx
> status code) and then assign the value of error_page to that value.

You may use use auth_request_set to make headers available as 
variables in main request.

See docs here:

Sample usage may be seen in tests here:

Maxim Dounin

More information about the nginx mailing list