Commit 665775b
Z User
fix: 使用 header() 替代 addHeader() 确保 User-Agent 唯一性
- AuthKeyService 和 HttpProtocol 中自定义 headers 添加方式从 addHeader() 改为 header()
- addHeader() 是追加模式,会导致多个 User-Agent 头,使鉴权服务器看到的 UA 与配置不一致
- header() 是替换模式,确保配置文件中的 User-Agent 是唯一的权威值
- 同时修复 anti-hotlink-enabled 默认值为 true(与 mcpatch.yml 配置保持一致)1 parent 0e2f559 commit 665775b
3 files changed
Lines changed: 9 additions & 5 deletions
File tree
- src/main/java/com/github/balloonupdate/mcpatch/client
- config
- network
- impl
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
| 191 | + | |
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
193 | 195 | | |
194 | 196 | | |
195 | | - | |
| 197 | + | |
196 | 198 | | |
197 | 199 | | |
198 | 200 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
283 | | - | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
284 | 286 | | |
285 | | - | |
| 287 | + | |
286 | 288 | | |
287 | 289 | | |
288 | 290 | | |
| |||
0 commit comments