http-proxy-middleware
Advanced tools
Comparing version 1.1.1 to 1.1.2-alpha.0
@@ -138,9 +138,10 @@ "use strict"; | ||
}); | ||
this.logError = (err, req, res) => { | ||
this.logError = (err, req, res) => __awaiter(this, void 0, void 0, function* () { | ||
const hostname = (req.headers && req.headers.host) || req.hostname || req.host; // (websocket) || (node0.10 || node 4/5) | ||
const target = this.proxyOptions.target.host || this.proxyOptions.target; | ||
const routerTarget = yield Router.getTarget(req, this.proxyOptions); | ||
const target = routerTarget || this.proxyOptions.target.host || this.proxyOptions.target; | ||
const errorMessage = '[HPM] Error occurred while trying to proxy request %s from %s to %s (%s) (%s)'; | ||
const errReference = 'https://nodejs.org/api/errors.html#errors_common_system_errors'; // link to Node Common Systems Errors page | ||
this.logger.error(errorMessage, req.url, hostname, target, err.code || err, errReference); | ||
}; | ||
}); | ||
this.config = config_factory_1.createConfig(context, opts); | ||
@@ -147,0 +148,0 @@ this.proxyOptions = this.config.options; |
{ | ||
"name": "http-proxy-middleware", | ||
"version": "1.1.1", | ||
"version": "1.1.2-alpha.0", | ||
"description": "The one-liner node.js proxy middleware for connect, express and browser-sync", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
64896
796
1