Document the admin real-time channel (POST /_/realtime) and X-CWA-Client-Id
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 67/100
- Issue 类型
- 文档
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
调研方向
Start in the bundle's content/4.api/ documentation and identify the endpoint and writer sections to update; check the linked bundle issue and PR for implementation details. Then find the template deployment guidance for Nelmio allow_headers and Mercure history settings. Done when the docs cover the endpoint behavior, payload, limits, writer echo, configuration, and deployment settings listed in this issue.
由索引模型根据 Issue 内容生成。
描述
The bundle is adding an admin real-time channel (api-components-bundle#559, PR #560). Please document the following.
Bundle (content/4.api/)
- Endpoint:
POST /_/realtime(/_api/_/realtimeunder the template).ROLE_ADMIN.- Body:
{clientId, event, iri?, data?}, 16 KB at most. - Responds 202, and stores nothing.
- Content types:
- JSON accepts any event.
text/plain(navigator.sendBeacon) is accepted only forevent: "presence"withdata.state: "left".- Anything else is 415.
- A cross-site request (
Sec-Fetch-Site) is 403.
- Payload, published privately on one site-wide topic that only admins' subscriber cookies grant:
{"@type": "CwaRealtimeEvent", "v": 1, clientId, user: {id, name}, event, iri, data, sentAt, expiresAt} - Rate limits:
- 20 burst / 10 a second per user and
clientId. - 60 burst / 30 a second per user across all their clients.
- Above either: 429 with
Retry-After. - The limiter pool
silverback.api_components.realtime.rate_limiter_cacheusescache.appby default, so the limits apply per pod. Point it at a shared adapter inframework.cache.poolsto make them exact.
- 20 burst / 10 a second per user and
- Publishing: bounded at 1 s. A failed or timed-out publish is logged and still answers 202.
- Config:
silverback_api_components.realtime.enabled(defaulttrue). Whenfalse, the endpoint is a 404 and no cookie grants the topic. - Writer echo: a write carrying
X-CWA-Client-Idgets_metadata.lastWrite: {clientId, userId, at}in the writer's response and in the private?draft=1update.atis server time, RFC 3339 with milliseconds.- Use
at, notmodifiedAt, to order draft updates.
Deployment
- The front end must be allowed to send
X-CWA-Client-Id. In the template, add it to nelmio'sallow_headers. The bundle has no Flex recipe yet (#259). - Presence events stay in the Mercure hub's replay history, so mention the hub's history size and retention settings.
- 主要语言
- TypeScript
- 星标
- 0
- 派生
- 0
- 平均合并
- 1 小时 20 分钟
- 30 天内合并 PR
- 1
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
components-web-app/docs 的其他 Issue
-
documentation
难度 4/5 3-5 天 新手友好度 45/100
components-web-app/docs#290 ·
-
难度 5/5 一周以上 新手友好度 35/100
components-web-app/docs#289 · 2 条评论 ·
-
documentation
难度 4/5 3-5 天 新手友好度 43/100
components-web-app/docs#285 ·
-
documentation
难度 4/5 1-2 天 新手友好度 35/100
components-web-app/docs#284 ·
-
enhancement
难度 5/5 一周以上 新手友好度 15/100
components-web-app/docs#237 · 2 条评论 ·
查看 components-web-app/docs 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
chaitin/MonkeyCode#1437 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 69/100
carbon-design-system/carbon-ai-chat#2615 ·
维护者通常 1 天内回复
-
e2e-failure ready-to-code
难度 2/5 1-3 小时 新手友好度 76/100
redhat-developer/rhdh-plugin-export-overlays#4486 · 1 条评论 ·
维护者通常 1 天内回复
-
[Bug]: fileUploadMatrix.test.ts URL case does a real DNS lookup and fails offline可能已有人在做 @r2jaff 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
ComposioHQ/composio#5054 ·
维护者通常 1 天内回复