From 9ffdc3712b8f1551bb333b963a084fd972382c3d Mon Sep 17 00:00:00 2001 From: Youen Date: Sun, 14 Aug 2022 19:11:57 +0200 Subject: [PATCH] minor fixes --- src/app.py | 2 +- src/web/admin/admin.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app.py b/src/app.py index 37a2a51..5570603 100644 --- a/src/app.py +++ b/src/app.py @@ -31,7 +31,7 @@ def create_app(): if app.config['BEHIND_REVERSE_PROXY']: from werkzeug.middleware.proxy_fix import ProxyFix - app.wsgi_app = ProxyFix(app.wsgi_app) + app.wsgi_app = ProxyFix(app.wsgi_app, x_for=1, x_proto=1, x_host=1, x_prefix=1) from api import api_document app.register_blueprint(api_document.bp) diff --git a/src/web/admin/admin.py b/src/web/admin/admin.py index a658578..13c706c 100644 --- a/src/web/admin/admin.py +++ b/src/web/admin/admin.py @@ -10,7 +10,7 @@ bp = Blueprint('admin', __name__, url_prefix='/admin') @bp.before_app_request def authenticate(): # Some views don't need authentication - if request.path == '/admin/login' or request.path.startswith('/doc/') or request.path == '/api/doc/build': + if request.path == '/' or request.path == '/admin/login' or request.path.startswith('/doc/') or request.path == '/api/doc/build': return authenticated = session.get('authenticated')