@dkx/http-middleware-proxy
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -23,3 +23,3 @@ "use strict"; | ||
} | ||
headers.set('host', options.host); | ||
headers.set('host', hostToHostHeader(options.host)); | ||
const init = { | ||
@@ -67,2 +67,12 @@ method: req.method, | ||
} | ||
function hostToHostHeader(host) { | ||
const url = url_1.parse(host); | ||
const parts = [ | ||
url.hostname, | ||
]; | ||
if (url.port !== '80') { | ||
parts.push(url.port); | ||
} | ||
return parts.join(':'); | ||
} | ||
function sendRequestTimeout(res) { | ||
@@ -69,0 +79,0 @@ res = res.withStatus(504); |
{ | ||
"name": "@dkx/http-middleware-proxy", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Proxy middleware for @dkx/http-server", | ||
@@ -5,0 +5,0 @@ "repository": "git@gitlab.com:dkx/http/middlewares/proxy.git", |
Sorry, the diff of this file is not supported yet
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
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
9250
102