Node HTTP Proxy Ttfb Timeout

Fix HTTP proxy requests hanging forever on keep-alive connections in Node.js. Use when: (1) First request works but second request hangs indefinitely, (2) socket.setTimeout or manual timer on 'socket' event doesn't fire for reused connections, (3) Proxy sits in front of a tunnel/origin that may go down (e.g., laptop sleeping), (4) Need reliable TTFB (time-to-first-byte) timeout that works for both fresh and keep-alive connections. Applies to http.request, https.request, and reverse proxy implementations.

hubeiqiao 6d219d0 5.5 KB Updated

File contents

hubeiqiao/skills/tree/main/node-http-proxy-ttfb-timeout commit 6d219d0844

Frequently asked questions

npx skillmds@latest add hubeiqiao/node-http-proxy-ttfb-timeout