jingrow/core/dynamic_router.py 迁移到 jingrow/services/whitelist.py
This commit is contained in:
parent
c424f0ee02
commit
e96cef021d
@ -10,7 +10,7 @@ from fastapi.middleware.cors import CORSMiddleware
|
||||
from contextlib import asynccontextmanager
|
||||
from jingrow.utils.router_auto_register import include_routers_from_package
|
||||
from jingrow.services.scheduler import start_scheduler, stop_scheduler
|
||||
from jingrow.core.dynamic_router import router
|
||||
from jingrow.services.whitelist import router
|
||||
|
||||
@asynccontextmanager
|
||||
async def lifespan(app: FastAPI):
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
"""
|
||||
Jingrow Local 动态路由
|
||||
Jingrow 白名单路由服务
|
||||
"""
|
||||
|
||||
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}")
|
||||
async def handle_request(request: Request, module_path: str):
|
||||
"""
|
||||
处理动态路由请求
|
||||
处理白名单路由请求
|
||||
"""
|
||||
try:
|
||||
# 首先检查是否是白名单函数
|
||||
Loading…
x
Reference in New Issue
Block a user