flask-basicauth
flask-basicauth copied to clipboard
Problem with authentication in Apache
Hi!
I'm having a similar problem as this one, but with this lib:
https://www.digitalocean.com/community/questions/flask-and-http-basic-authentication
In my machine everything works as it should, but when I try it in the production server, when I try to access a page where authentication is needed, the auth prompt keeps popping up, even after inserting the correct user and password.
Info about the machine in which there are problems:
uname -a
Linux chronos 2.6.32-431.17.1.el6.x86_64 #1 SMP Wed May 7 23:32:49 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
cat /etc/issue
CentOS release 6.5 (Final)
apachectl -V
Server version: Apache/2.2.15 (Unix)
For others who encounter this - if you're using mod_wsgi, the solution is to add the following line to your Apache configuration:
WSGIPassAuthorization On
That will allow Apache to forward the basic auth credentials to your Flask application.