Proxy Fix
This commit is contained in:
parent
3db7c41ae4
commit
4ea85bcdc8
@ -8,6 +8,7 @@ from pymongo import MongoClient
|
|||||||
from pymongo.errors import ConnectionFailure
|
from pymongo.errors import ConnectionFailure
|
||||||
from flask_wtf.csrf import CSRFProtect, CSRFError
|
from flask_wtf.csrf import CSRFProtect, CSRFError
|
||||||
from flask_mail import Mail
|
from flask_mail import Mail
|
||||||
|
from werkzeug.middleware.proxy_fix import ProxyFix
|
||||||
|
|
||||||
from common.security import check_keyfile_exists, generate_keyfile
|
from common.security import check_keyfile_exists, generate_keyfile
|
||||||
import config
|
import config
|
||||||
@ -70,6 +71,8 @@ def create_app():
|
|||||||
Bootstrap(app)
|
Bootstrap(app)
|
||||||
csrf = CSRFProtect(app)
|
csrf = CSRFProtect(app)
|
||||||
|
|
||||||
|
app.wsgi_app = ProxyFix(app.wsgi_app, x_proto=1, x_host=1)
|
||||||
|
|
||||||
return app
|
return app
|
||||||
|
|
||||||
app = create_app()
|
app = create_app()
|
||||||
|
Loading…
Reference in New Issue
Block a user