jingrow/core/dynamic_router.py 迁移到 jingrow/services/whitelist.py

This commit is contained in:
jingrow 2025-10-25 01:29:54 +08:00
parent c424f0ee02
commit e96cef021d
2 changed files with 3 additions and 3 deletions

View File

@ -10,7 +10,7 @@ from fastapi.middleware.cors import CORSMiddleware
from contextlib import asynccontextmanager from contextlib import asynccontextmanager
from jingrow.utils.router_auto_register import include_routers_from_package from jingrow.utils.router_auto_register import include_routers_from_package
from jingrow.services.scheduler import start_scheduler, stop_scheduler from jingrow.services.scheduler import start_scheduler, stop_scheduler
from jingrow.core.dynamic_router import router from jingrow.services.whitelist import router
@asynccontextmanager @asynccontextmanager
async def lifespan(app: FastAPI): async def lifespan(app: FastAPI):

View File

@ -2,7 +2,7 @@
# For license information, please see license.txt # For license information, please see license.txt
""" """
Jingrow Local 动态路由 Jingrow 白名单路由服务
""" """
from fastapi import APIRouter, Request, HTTPException from fastapi import APIRouter, Request, HTTPException
@ -60,7 +60,7 @@ async def authenticate_request(request: Request, allow_guest: bool) -> bool:
@router.post("/{module_path:path}") @router.post("/{module_path:path}")
async def handle_request(request: Request, module_path: str): async def handle_request(request: Request, module_path: str):
""" """
处理动态路由请求 处理白名单路由请求
""" """
try: try:
# 首先检查是否是白名单函数 # 首先检查是否是白名单函数