tRPC sends duplicate header
i tried setting up a reverse proxy for my NextJS + tRPC app using those 3 options:
- nginx
- traefik
- caddy
in all of them when i try to invoke a procedure using a
.useMutation()
hook it fails with such error:
nginx: upstream sent duplicate header line: "Transfer-Encoding: chunked"
traefik, caddy: net/http: HTTP/1.x transport connection broken: too many transfer encodings: [\"chunked\" \"chunked\"]
after investigating a bit in nginx i can see that it indeed sends it twice:
what can i do to fix this? is this an issue on my end somehow?1 Reply
explained more here + reproduction:
https://github.com/trpc/trpc/issues/6909
GitHub
bug: tRPC sends duplicate header Transfer-Encoding: chunked · Issu...
Provide environment information System: OS: macOS 15.4.1 CPU: (10) arm64 Apple M2 Pro Memory: 133.44 MB / 16.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 22.14.0 - ~/.nvm/versions/node/v22.14.0/bin/...