proxy-chain
Advanced tools
Comparing version 0.1.5 to 0.1.6
@@ -209,3 +209,3 @@ 'use strict'; | ||
this.srcResponse.writeHead(500); | ||
this.srcResponse.end('Internal server error'); | ||
this.srcResponse.end('Internal error in proxy server'); | ||
} | ||
@@ -212,0 +212,0 @@ } |
@@ -14,2 +14,3 @@ 'use strict'; | ||
Server: _server.Server, | ||
RequestError: _server.RequestError, | ||
parseUrl: _tools.parseUrl, | ||
@@ -16,0 +17,0 @@ redactUrl: _tools.redactUrl, |
@@ -6,3 +6,3 @@ 'use strict'; | ||
}); | ||
exports.Server = undefined; | ||
exports.Server = exports.RequestError = undefined; | ||
@@ -75,3 +75,10 @@ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
var RequestError = function (_Error) { | ||
/** | ||
* Represents custom request error. The message is emitted as HTTP response | ||
* with a specific HTTP code and headers. | ||
* If this error is thrown from the `prepareRequestFunction` function, | ||
* the message and status code is sent to client. | ||
*/ | ||
var RequestError = exports.RequestError = function (_Error) { | ||
_inherits(RequestError, _Error); | ||
@@ -336,3 +343,3 @@ | ||
this.log('Request failed with unknown error: ' + (err.stack || err)); | ||
this.sendResponse(request.socket, 500, null, 'Internal server error'); | ||
this.sendResponse(request.socket, 500, null, 'Internal error in proxy server'); | ||
this.emit('requestFailed', err); | ||
@@ -339,0 +346,0 @@ } |
{ | ||
"name": "proxy-chain", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "Node.js implementation of a proxy server (think Squid) with support for SSL, authentication and upstream proxy chaining.", | ||
@@ -33,5 +33,4 @@ "main": "build/index.js", | ||
"build": "rm -rf ./build && babel src --out-dir build", | ||
"mytest": "npm run build && node ./build/test_run.js", | ||
"local-proxy": "npm run build && node ./build/run_locally.js", | ||
"test": "npm run build && mocha --compilers js:babel-core/register --recursive", | ||
"test-cov": "npm run build && babel-node node_modules/isparta/bin/isparta cover --report html --report text node_modules/.bin/_mocha", | ||
"prepare": "npm run build", | ||
@@ -38,0 +37,0 @@ "prepublishOnly": "(test $RUNNING_FROM_SCRIPT || (echo \"You must use publish.sh instead of 'npm publish' directly!\"; exit 1)) && npm test && npm run lint", |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances 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
81557
13
1229
3
6