[Flask] Flask-Security =?utf-8?Q?can=E2=80=99t_?=work with Gunicorn with multiple workers
stamaimer at gmail.com
Tue Jan 10 01:11:57 EST 2017
I’m writing a website with Flask. I use Flask-Security to do authentication and use Nginx + Gunicorn to deploy it.
And I find a problem that Flask-Security can’t work with Gunicorn with multiple workers.
If the worker number is one, I can login normally. If the worker number of Gunicorn is greater than one or there is more than one Gunicorn servers behind Nginx, There are three situations will happen:
1. It will login normally;
2. It will redirect to login page again;
3. It will redirect to the page protected by Flask-Security with unlogined status.
After I expose Gunicorn server to public, It remains.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Flask