While using nodeJS for a service I'm creating i've noticed that the "connection": "closed" header is always present. I've tried to remove it but best i could do is to have it be an empty string instead of the closed value but the header is always present.
I've tried using multiple http libraries and event the native nodejs http module with no luck.
According the official docs for the http.agent class i didn't find a solution to removing this header.
Is there a way to completely control how an http request looks like in node or am I stuck with the connection header for ever?
For node version 22.x and above you can use setDefaultHeaders: false in the http request options [default is true] DOCS.