From 16e832f46f043efe4112727d4ccc4097fde67e51 Mon Sep 17 00:00:00 2001 From: Iam54r1n4 Date: Wed, 5 Feb 2025 22:33:29 +0000 Subject: [PATCH] Fix public routes path --- core/scripts/webpanel/middleware/auth.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/scripts/webpanel/middleware/auth.py b/core/scripts/webpanel/middleware/auth.py index 789d05e..415938d 100644 --- a/core/scripts/webpanel/middleware/auth.py +++ b/core/scripts/webpanel/middleware/auth.py @@ -6,6 +6,7 @@ from typing import Awaitable, Callable from datetime import datetime, timezone from session import SessionManager +from config import CONFIGS class AuthMiddleware(BaseHTTPMiddleware): @@ -19,8 +20,8 @@ class AuthMiddleware(BaseHTTPMiddleware): async def dispatch(self, request: Request, call_next: Callable[[Request], Awaitable[Response]]): '''Handles session authentication.''' public_routes = [ - '/login', - '/robots.txt' + f'/{CONFIGS.ROOT_PATH}/login', + f'/{CONFIGS.ROOT_PATH}/robots.txt' ] if request.url.path in public_routes: return await call_next(request)