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