[R1] 接受 /v{N}/ 版本前缀 #1
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
部署背景
单域名 https://wire.treeden.app:根路径由 wire-webapp 提供静态前端(Express 服务);
/api/*与/ws/*由 Caddy 反代到 wire-rs,并剥离前缀(handle_path)。前端配置BACKEND_REST=https://wire.treeden.app/api、BACKEND_WS=wss://wire.treeden.app/ws。现象与冒烟证据
前端协商版本后请求
{BACKEND_REST}/v{N}/...。冒烟:/self200,但/v6/self404。冒烟测试(2026-11-09,wire-rs
ccecae5release 构建):/healthz200、/api-version200(supported 0–19,development 19)、POST /register201、POST /login200(zuidcookie:Path=/access; Secure; HttpOnly; SameSite=Lax)、GET /self200、POST /access200、GET /conversations200、/awaitWebSocket 101;而/v6/self404、/feature-configs404、/properties404、/teams404、/list-connections404、/notifications/last404、/calls/config/v2404、/system/settings/unauthorized404、/conversations/list-ids400(被当作会话 ID 解析)、/mls/public-keys400(未配置 removal key)。期望行为
所有路由同时接受
/v{N}/<path>(N 在 supported 范围内),例如通过 nest 或去前缀中间件;超出范围的版本返回与参考实现一致的错误。Caddy 可临时用正则改写顶替,但应在服务端解决。涉及文件/模块
src/http.rs工作量估计
S(1–2 小时)
keith referenced this issue from keith/wire-webapp2026-11-08 23:06:07 +00:00
keith referenced this issue2026-11-08 23:06:07 +00:00
keith referenced this issue from keith/wire-webapp2026-11-08 23:37:04 +00:00
已实现并通过 M11 验收
/v{N}/前缀对所有路由生效(N = 0–8),超范围返回404 unsupported-version(参考文本);/api-version固定 v8(supported: 0..8、development: [])。M11 accepted · commit
56437e7· docdocs/milestones/M11.md· gates: default 886 / test:db 177 (14 suites) / interop 971 / live 14 (×3, no flake) · integration agent 221 real-process assertions.