auth_request, HTTP 401 and missing header WWW-Authenticate

Piotr Sikora piotr.sikora at frickle.com
Wed Feb 2 10:29:47 MSK 2011


Hi,

> I can see from source code for auth_request that it should produce "WWW-
> Authenticate" headers, however it never does for me... would really 
> appreciate
> any suggestions helping me to resolve this.

You're mistaken. The code you're looking at only passes down this header if 
upstream produces it (and ngx_postgres doesn't do that).

Try using ngx_headers_more module [1], I'm pretty sure it can add headers to 
error responses.

[1] https://github.com/agentzh/headers-more-nginx-module

Best regards,
Piotr Sikora < piotr.sikora at frickle.com >




More information about the nginx mailing list