superjoe30/connect-proxy — pull request #3 by DEADB17 (2013-01-08 19:00:47+00:00)
Title: extend request headers if the corresponding options object is set 

Sets the header options of the request. e.g.:

var connect = require('connect');
var url = require('url');
var proxy = require('proxy-middleware');
var app = connect();
var options = url.parse('http://sub.example.com/api');
options.headers = {host: 'my.example.com'};
app.use('/api', proxy(options));
app.use('/', connect['static']('www'));
app.listen(8000);

In this case, assuming you are running the server @ `localhost:8000`,
the request to `http://sub.example.com/api` will have the `host` header
set to `my.example.com` instead of `localhost`.