feat: brand 白名单下发(站点覆盖/租户头像/CORS) + widget/chat 客户端 key 租户化 + 会话站点标
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user