dvonlehman / express-request-proxy

Advanced streaming http request proxy middleware for Express with support for custom routes, caching, and response transforms.
96 stars 38 forks source link

Custom statusMessage #26

Open NikunGe opened 7 years ago

NikunGe commented 7 years ago

Hi,

I am proxying to a server that is setting a custom statusMessage in the response (> 400). The statusMessage is not being sent back through the proxy, as requestjs pipeDest function is not automatically setting it. Please see here: https://github.com/request/request/issues/2694

Since it is not being set by requestejs automatically, can we set it before calling pipe?

https://github.com/4front/express-request-proxy/blob/e13778be505940649410f3c4f44bde58ddf69caa/lib/proxy.js#L95

Thank you!