create: 首页学习状态走 WS/WSS

MemRelay-Operation: memory-save:mem-20261115-study-ws
MemRelay-Resource: 520e19bb-ebd9-4455-a276-d41b912ba11a
This commit is contained in:
2026-11-15 15:18:49 +08:00
parent f39675166c
commit c3def9dc8d
@@ -0,0 +1,20 @@
---
title: 首页学习状态走 WS/WSS
type: fact
permalink: main/projects/f5708b07-f0ea-42a4-b4ed-0e5443990ff9/首页学习状态走-ws-wss
stable_id: 520e19bb-ebd9-4455-a276-d41b912ba11a
scope: project
memory_type: fact
project_id: f5708b07-f0ea-42a4-b4ed-0e5443990ff9
usage_profile_id: 0c9feb46-d06e-43cd-9ef0-c5813c84a998
status: active
revision: 1
request_id: mem-20261115-study-ws
created_at: '2026-11-15T07:18:42.768294+00:00'
updated_at: '2026-11-15T07:18:42.768294+00:00'
tags:
- websocket
- home
---
首页学习状态改 WebSocket `/api/settings/study-control/ws`,Cookie 鉴权。前端 `location.protocol==='https:' ? wss : ws`。断线回退 HTTP 10s。uvicorn 必须有 wsproto(已写 requirements),否则 Upgrade 报 404。上线 HTTPS 反代理需 Upgrade/Connection headers。_jitter 不再 5 秒底,间隔 0 不等待;小间隔流程 ±20%。进度行显示 百分比与 sent/total。