diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2021-08-17 11:32:45 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2021-08-17 11:32:45 +0200 |
commit | e09d2d258e992a08df0f96efbf296ad05f798e9b (patch) | |
tree | 5a18049c23ab6b8517a0f64df55d55b6da619f38 /fbin | |
parent | f2988d940f2ca21d949e2a9fdfb5e9f780598820 (diff) |
Add ProxyFix middleware
This is needed for the proper request URLs to be detected during login.
Diffstat (limited to 'fbin')
-rw-r--r-- | fbin/__init__.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fbin/__init__.py b/fbin/__init__.py index f36d74b..7bcdf0b 100644 --- a/fbin/__init__.py +++ b/fbin/__init__.py @@ -1,13 +1,14 @@ from flask import Flask, url_for, Markup, request from flask_login import current_user from werkzeug.routing import BaseConverter +from werkzeug.middleware.proxy_fix import ProxyFix app = Flask(__name__) app.config.from_pyfile('fbin.cfg') - -# Set up some custom converters. These are needed for file URLs to be properly parsed. +app.wsgi_app = ProxyFix(app.wsgi_app) +# Set up some custom converters. These are needed for file URLs to be properly parsed. class HashConverter(BaseConverter): regex = r'\w+' |