login/logout breaks with flask debugs disabled
iskobkarev opened this issue · comments
Hello, Chris
I've been playing with this template of yours and it is quite well written and works very well.
One issue was discovered though.
Apparently, once debug is disabled (or if the script is used with waitress):
app.run(host='0.0.0.0', port=8080, debug=False)
and redirects to https are also disabled to make it work around that forced https redirect:
talisman = Talisman(app, content_security_policy=csp, force_https=False)
then the login/logout functionality breaks completely. There is no errors, and nothing in the logs. If you were logged in before disabling debugs the logout is not possible. Otherwise the login fails but not due to password error. It just does not go to the target ("next") page and stays on the same login page.
Any advise is appreciated, these two steps above reliable reproduce the issue with your app template
Thanks
Igor
One more thing.
Enabling ssl under flask app makes everything work.