mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-22 16:43:35 +00:00
- 配置 compression 中间件排除 SSE 流式响应,避免压缩导致的缓冲 - 添加 X-Accel-Buffering: no 响应头,禁用 Nginx 等代理的缓冲 - 使用 res.flushHeaders() 立即发送响应头 - 禁用 Nagle 算法确保数据立即发送 - 在每次写入流数据后调用 flush() 确保实时传输 这些修复确保了流式请求能够正常显示打字机效果,数据从上游 Claude API 接收后能够立即转发给客户端。 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>