proxy-chain
Advanced tools
Comparing version 0.1.13 to 0.1.14
@@ -95,3 +95,3 @@ 'use strict'; | ||
reqOpts.headers[headerName] = headerValue; | ||
(0, _tools.addHeader)(reqOpts.headers, headerName, headerValue); | ||
} | ||
@@ -177,3 +177,3 @@ | ||
headers[headerName] = headerValue; | ||
(0, _tools.addHeader)(headers, headerName, headerValue); | ||
} | ||
@@ -180,0 +180,0 @@ |
@@ -6,3 +6,3 @@ 'use strict'; | ||
}); | ||
exports.parseProxyAuthorizationHeader = exports.redactParsedUrl = exports.redactUrl = exports.parseUrl = exports.isInvalidHeader = exports.isHopByHopHeader = exports.parseHostHeader = undefined; | ||
exports.addHeader = exports.parseProxyAuthorizationHeader = exports.redactParsedUrl = exports.redactUrl = exports.parseUrl = exports.isInvalidHeader = exports.isHopByHopHeader = exports.parseHostHeader = undefined; | ||
@@ -174,2 +174,12 @@ var _url = require('url'); | ||
}; | ||
*/ | ||
*/ | ||
var addHeader = exports.addHeader = function addHeader(headers, name, value) { | ||
if (headers[name] === undefined) { | ||
headers[name] = value; | ||
} else if (Array.isArray(headers[name])) { | ||
headers[name].push(value); | ||
} else { | ||
headers[name] = [headers[name], value]; | ||
} | ||
}; |
@@ -1,3 +0,7 @@ | ||
0.0.x / 2017-11-06 | ||
0.1.14 / 2017-12-19 | ||
================== | ||
- added support for multiple headers with the same name (thx shershennm) | ||
0.0.1 / 2017-11-06 | ||
================== | ||
- Project created |
{ | ||
"name": "proxy-chain", | ||
"version": "0.1.13", | ||
"version": "0.1.14", | ||
"description": "Node.js implementation of a proxy server (think Squid) with support for SSL, authentication and upstream proxy chaining.", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
85117
1297
7