yml2213
|
1f8252a6bc
|
perf(caddy): encode 提到 handle 之前,API 响应终于会被压缩
抓包发现订单列表响应 75.9KB 明文下发(客户端已发 Accept-Encoding: gzip, br,
响应既无 content-encoding 也无压缩)。原因在 Caddyfile:`encode zstd gzip` 写在
`handle /api/*` 之后,而 Caddy 的 route 按书写顺序执行、handle 匹配后即终止链路,
于是所有 API 响应都绕过了编码器;静态文件一直是压缩的,只是因为它们落在 encode
之后的 file_server。
把 encode 提到 route 内最前面即可(SSE 的 text/event-stream 不在 encode 默认
压缩类型里,事件流不受影响)。后台与打手端 API 同时受益。
验证:部署后 curl 订单列表应出现 content-encoding: gzip 且体积大幅下降;
静态资源仍然压缩;/api/v1/admin/realtime 仍正常流式返回。
|
2026-10-01 15:39:03 +08:00 |
|
yml2213
|
0dfc1ef0df
|
mall.khhao.com增加
|
2026-08-23 13:40:06 +08:00 |
|
yml2213
|
bc2909d6f2
|
打手端迁移至独立子域名
|
2026-08-16 16:08:38 +08:00 |
|
yml2213
|
e0e4f71830
|
Caddyfile 增加 live.khhao.com 反代 douyu-login
|
2026-08-02 11:43:55 +08:00 |
|
yml2213
|
58a902dd3b
|
增加飞飞领取短链
|
2026-07-07 21:13:37 +08:00 |
|
yml2213
|
dc8a014601
|
优化启动流程
|
2026-04-13 19:01:48 +08:00 |
|
yml
|
a95247cd01
|
修复错误
|
2026-04-09 18:11:02 +08:00 |
|
yml
|
e4ab1f559e
|
优化了一些文件 增加多店铺
|
2026-04-09 01:31:47 +08:00 |
|
yml
|
a2b09c89e8
|
开始多平台 多店铺整改
|
2026-04-08 22:21:11 +08:00 |
|
yml
|
313c036845
|
init
|
2026-04-08 16:30:42 +08:00 |
|