Welcome! Log In Create A New Profile

Advanced

Inconsistent behavior with Nginx's auth_request_set and more_set_input_headers

Anonymous User
June 28, 2014 01:36PM
Hi,

I'm trying to use the auth_request module in conjunction with the
more_set_input_headers to automatically login my users into web apps.

Basically, it works like this:

1. Users have some session cookie that authenticates them.
2. I have a PHP script (auth.php) that validates the cookie and returns
their proper username as a response header.
3. Nginx calls auth.php with auth_request, and sets the username in a
variable.
4. Nginx then calls the web app with a request header set to the correct
username.
5. The web app reads the header, and logs the user in.

This works, but strangely inconsistent. The issue is that when a user
accesses the web app on /app/, it works (the request header is sent),
but when the app is accesssed on /app/index.php, it never receives the
header from nginx.

I've created a mock configuration that reproduces the error. It doesn't
matter if I use a browser or cURL; both give the same behavior.

I thought it'd be a bit hard to view configuration files on a mailing
list, so I've created a topic on ServerFault. Reply whichever way you
like best. Topic is here:

http://serverfault.com/questions/608625/inconsistent-behavior-with-nginxs-auth-request-set-and-more-set-input-%20headers

Thanks a lot! This issue has kept me up for a few days now already.

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

Inconsistent behavior with Nginx's auth_request_set and more_set_input_headers

Anonymous User June 28, 2014 01:36PM

Re: Inconsistent behavior with Nginx's auth_request_set and more_set_input_headers

Maxim Dounin June 30, 2014 06:54PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 69
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready