Created by: rick-kilgore
Fix for https://github.com/nodejitsu/node-http-proxy/issues/867, and possibly these others: https://github.com/nodejitsu/node-http-proxy/issues/908, https://github.com/nodejitsu/node-http-proxy/issues/930, https://github.com/nodejitsu/node-http-proxy/issues/889, https://github.com/nodejitsu/node-http-proxy/issues/680.
This solution was suggested by @giuliopaci in https://github.com/nodejitsu/node-http-proxy/issues/867. The problem with the header re-writing example in the README is that when you do a POST, the headers are sent before the 'proxyReq' event is fired. So you really have to add the headers before calling request(). This patch allows the user to register a synchronous callback that gets called in setupOutgoing() in which the caller can setup headers, or alter the outgoing request() options in whatever way desired.