fix: 修复桌面版配置请求网络错误

This commit is contained in:
2026-05-20 15:16:48 +08:00
parent 2cdc0a0c81
commit 22c343a85e
9 changed files with 21 additions and 9 deletions
+4 -1
View File
@@ -12,7 +12,7 @@ from app.auth import verify_jwt_token
from app.config import BASE_DIR
APP_VERSION = "2.0.2"
APP_VERSION = "2.0.3"
APP_HOST = "0.0.0.0"
APP_PORT = 9081
FRONTEND_DIST_DIR = BASE_DIR / "frontend" / "dist"
@@ -43,6 +43,9 @@ def create_app() -> FastAPI:
async def jwt_middleware(request: Request, call_next):
if request.method == "OPTIONS":
return await call_next(request)
path = request.url.path
if path.startswith("/api/") and path != "/api/login":
auth_header = request.headers.get("Authorization")