mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
ENH: added 'headers' to available options, to add or overwrite existing headers
This commit is contained in:
parent
427d8d8536
commit
7d840d3515
@ -1,6 +1,7 @@
|
||||
var common = exports
|
||||
var common = exports
|
||||
, http = require('http')
|
||||
, https = require('https')
|
||||
, extend = require('util')._extend
|
||||
;
|
||||
|
||||
/**
|
||||
@ -35,6 +36,10 @@ common.setupOutgoing = function(outgoing, options, req, forward) {
|
||||
function(e) { outgoing[e] = req[e]; }
|
||||
);
|
||||
|
||||
if (options.headers){
|
||||
extend(outgoing.headers, options.headers);
|
||||
}
|
||||
|
||||
if (options.agent){
|
||||
outgoing.agent = options.agent;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user