feat: brand 白名单下发(站点覆盖/租户头像/CORS) + widget/chat 客户端 key 租户化 + 会话站点标

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
浅念
2026-10-12 22:26:15 +08:00
parent 49e2b476f5
commit bbc7bc520e
15 changed files with 570 additions and 93 deletions
+6
View File
@@ -48,6 +48,12 @@ async def ws_chat(websocket: WebSocket):
init_data = await websocket.receive_text()
init_msg = json.loads(init_data)
# Task 10: 客户端自报 site(空域名站点如 es 靠嵌入代码 data-site
# 接入)记入 client_info 作会话站点标——只加记录,不参与业务逻辑
site_slug = str(init_msg.get("site") or "").strip()
if site_slug:
client_info["site"] = site_slug
if "session_id" in init_msg:
conv = await manager.get_by_session(init_msg["session_id"])
if conv and conv.status == ConversationStatus.active: