diff --git a/start_web.py b/start_web.py index 794208c..5ea7fc0 100644 --- a/start_web.py +++ b/start_web.py @@ -127,14 +127,14 @@ def main(): "session_manager": session_manager } - # Setup static files and routes - setup_static_files(app) - - # Add authentication middleware if enabled + # Add authentication middleware if enabled (BEFORE routes) if auth_enabled: app.add_middleware(SimpleAuthMiddleware, config=config) print("🔐 Authentication middleware added to web interface") + # Setup static files and routes + setup_static_files(app) + # Register web routes register_web_routes(app, dependencies)