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')