mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
ENH: updated ws and web functions to use the global options object as a base
even if request options is specified. request options will over write any global options in a conflict
This commit is contained in:
parent
1b867a7f59
commit
268afe34bb
@ -1,5 +1,6 @@
|
||||
var caronte = exports,
|
||||
web = require('./passes/web-incoming');
|
||||
extend = require('util')._extend,
|
||||
web = require('./passes/web-incoming'),
|
||||
ws = require('./passes/ws-incoming');
|
||||
|
||||
caronte.createWebProxy = createRightProxy('web');
|
||||
@ -41,7 +42,11 @@ function createRightProxy(type) {
|
||||
!(args[cntr] instanceof Buffer) &&
|
||||
args[cntr] !== res
|
||||
) {
|
||||
options = args[cntr];
|
||||
//Copy global options
|
||||
options = extend({}, options);
|
||||
//Overwrite with request options
|
||||
extend(options, args[cntr]);
|
||||
|
||||
cntr--;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user