fix: 修复桌面版配置请求网络错误
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
@@ -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
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user