Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with authentication in Apache #12

Open
LLCampos opened this issue Dec 8, 2016 · 1 comment
Open

Problem with authentication in Apache #12

LLCampos opened this issue Dec 8, 2016 · 1 comment

Comments

@LLCampos
Copy link

LLCampos commented Dec 8, 2016

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)
@michael-lazar
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants