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
+1 -1
View File
@@ -32,7 +32,7 @@ async def health_check():
return {
"status": "healthy" if is_healthy else "unhealthy",
"timestamp": datetime.now().isoformat(),
"version": "2.0.2",
"version": "2.0.3",
"uptime_pid": os.getpid(),
"checks": checks,
}
+1 -1
View File
@@ -54,7 +54,7 @@ async def restart_service():
async def get_service_status():
return {
"status": "running",
"version": "2.0.2",
"version": "2.0.3",
"platform": platform.system(),
"supervisor": is_supervisor_running(),
"container": is_container_runtime(),
+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")