node-http-proxy
node-http-proxy copied to clipboard
Add option for attaching outgoing headers, extraHeaders.
This also required adjusting web-incoming to pass the options object to the web-outgoing passes. One thing I noticed is that web-outgoing doesn't appear to be exposed to anyone that wants mutate it externally.
I think extensions of this nature would be better done via some well-defined API that allows me to mutate the passes on the proxy object. But, as it stands that doesn't exist and is too much for me to just guess at what would be acceptable and try to fix.
Why aren't web-outgoing passes exposed the way incoming passes are exposed, for before and after hooks?
@cheddar could you rebase the PR and rename to outgoingHeaders? This seems reasonable, sorry it took so long
Also as a note, headers can be modified in the proxyRes
event