fix(webhook): support Feishu v2 and redact secrets - #144
Draft
ZeroPointSix wants to merge 4 commits into
Draft
Conversation
Owner
Author
|
验证更新:
PR 保持草稿,未合并、未打 tag、未部署 Railway、未轮换 Webhook 密钥。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request type / PR 类型
What is the current behavior? / 当前行为是什么?
Railway 上的两个实例共用同一发送实现。该实现固定用
text/plain投递,飞书自定义机器人 v2 Webhook 返回HTTP 400 / code 9499。失败日志还会保留完整 URL 路径,导致/hook/<密钥>暴露。What is the new behavior? / 新行为是什么?
open.feishu.cn与open.larksuite.com的/open-apis/bot/v2/hook/地址,按官方协议发送application/json; charset=utf-8和{"msg_type":"text","content":{"text":"..."}}。text/plain,现有可选X-Webhook-Token行为不变。<redacted>;请求异常、响应正文、URL 路径、查询参数、片段和 userinfo 不再进入日志。2.8.1,无数据库迁移。官方协议依据:飞书自定义机器人使用指南。
Verification / 验证
python -m py_compile:目标服务与测试文件通过。Code Quality与Python Tests:PR 创建后等待执行。Deployment boundary / 部署边界
本 PR 不合并、不打 tag、不发布镜像、不部署 Railway,也不轮换 Webhook 密钥。生产操作需另行明确授权与凭证。