fix: middleware

This commit is contained in:
sbcrumb authored and sbcrumb committed 2025-10-22 21:27:03 -04:00
1 parent f67663a338
commit 4ba8db48f7
1 file changed
+4 -4
+4 -4
View File
@@ -127,14 +127,14 @@ def main():
"session_manager": session_manager "session_manager": session_manager
} }
# Setup static files and routes # Add authentication middleware if enabled (BEFORE routes)
setup_static_files(app)
# Add authentication middleware if enabled
if auth_enabled: if auth_enabled:
app.add_middleware(SimpleAuthMiddleware, config=config) app.add_middleware(SimpleAuthMiddleware, config=config)
print("🔐 Authentication middleware added to web interface") print("🔐 Authentication middleware added to web interface")
# Setup static files and routes
setup_static_files(app)
# Register web routes # Register web routes
register_web_routes(app, dependencies) register_web_routes(app, dependencies)