Skip to content

Commit 9c664b1

Browse files
committed
refactor: header key value exceed
1 parent ebf1190 commit 9c664b1

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

flashduty/en/1. On-call/8. Integrations/8.1 Alerts integration/8.1.54 Label Mapping API.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ To prevent security bypasses, request smuggling, IP spoofing, and cache poisonin
175175
### Header Best Practices
176176

177177
1. **Allowlist Mode**: It is recommended to only allow custom Headers prefixed with `X-Custom-` or `X-Enrich-`
178-
2. **Length Limits**: The Key or Value length of a single Header should not exceed 1024 bytes
178+
2. **Length Limits**: The Key length of a single Header should not exceed 1024 bytes, the Value length of a single Header should not exceed 4096 bytes
179179
3. **Format Validation**: Header Values must not contain line breaks (`\r`, `\n`) to prevent Header injection attacks
180180

181181
## V. Best Practices

flashduty/zh/1. On-call/5. 集成引导/8.1 告警集成/8.1.54 标签映射API.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ POST, Content-Type:"application/json"
175175
### Header 最佳实践
176176

177177
1. **白名单模式**:建议仅允许以 `X-Custom-``X-Enrich-` 为前缀的自定义 Header
178-
2. **长度限制**:单个 Header 的 Key Value 长度不应超过 1024 字节
178+
2. **长度限制**:单个 Header 的 Key 长度不应超过 1024 字节, Value 长度不应超过 4096 字节
179179
3. **格式校验**:Header 的 Value 严禁包含换行符(`\r``\n`),以防止 Header 注入攻击
180180

181181
## 五、最佳实践

0 commit comments

Comments
 (0)