villadora / express-http-proxy

Proxy middleware for express/connect
Other
1.22k stars 236 forks source link

Alternative solution to #316: add requestModules capability #498

Open vaughan99 opened 2 years ago

vaughan99 commented 2 years ago

I also need the ability to follow redirects automatically, but I realize the original #316 solution was intrusive in that it forced everyone to use follow-redirects. With a little more work, I wanted to present this solution, which instead allows for a dependency injection of request modules into the proxy. This alleviates express-http-proxy of any responsibility to supportfollow-redirects directly, and allows for custom request modules as well.