Merge branch 'master' into dhk-1
Integrate task deeplink/FX workspace updates from master while keeping dhk-1 menu-overrides and sensitive-words documentation in CLAUDE.md. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
commit
e6a41dbc97
26 files changed
+1302
-84
No files matched your search
@@ -0,0 +1,28 @@
|
||||
"""公开只读配置接口(前端运行时读取 config.yaml 派生值)。
|
||||
|
||||
目前只暴露 ``task_deeplink`` 段(任务深链 rwfx 的目的树闸门地址 + 测试开关 +
|
||||
测试假数据),供前端登录深链流程在运行时读取——无需把这些地址硬编码进前端,
|
||||
改 ``config.yaml`` 即时生效(Gateway mtime 热重载)。
|
||||
|
||||
**无鉴权**:路由挂在 ``/api/public/`` 前缀下,已被
|
||||
``auth_middleware._PUBLIC_PATH_PREFIXES`` 白名单放行。段内只有地址与开关,不含密钥。
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
|
||||
from fastapi import APIRouter
|
||||
|
||||
from deerflow.config import get_app_config
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
router = APIRouter(prefix="/api/public/config", tags=["public-config"])
|
||||
|
||||
|
||||
@router.get("/task-deeplink")
|
||||
async def get_task_deeplink_config() -> dict:
|
||||
"""返回 ``config.yaml`` 的 ``task_deeplink`` 段(含 test/delete_test/各 URL/mock)。"""
|
||||
config = get_app_config()
|
||||
return config.task_deeplink.model_dump()
|
||||
Reference in new issue
Block a user