From cf3526f82a7f104fdbdea6fc6fd5f6f0a6090420 Mon Sep 17 00:00:00 2001 From: Michael Sprauer Date: Wed, 29 Aug 2018 14:43:58 +0200 Subject: [PATCH] remove that port from the pattern (when is that ever useful?) Signed-off-by: Michael Sprauer --- lib/middleware/serveProxies.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/middleware/serveProxies.js b/lib/middleware/serveProxies.js index 46e5ad82..cfe25fc0 100644 --- a/lib/middleware/serveProxies.js +++ b/lib/middleware/serveProxies.js @@ -1,4 +1,4 @@ -// eavily inspired by https://github.com/SAP/connect-openui5/blob/master/lib/proxy.js +// heavily inspired by https://github.com/SAP/connect-openui5/blob/master/lib/proxy.js const url = require("url"); const httpProxy = require("http-proxy"); @@ -26,11 +26,6 @@ function getProxyUri(uri) { // Remove leading * and make sure to have exact one leading dot (.) pattern = pattern.replace(/^[*]+/, "").replace(/^\.*/, "."); - // add port if no specified - if (pattern.indexOf(":") === -1) { - pattern += ":" + port; - } - // if host ends with pattern, no proxy should be used if (canonicalHost.indexOf(pattern) === canonicalHost.length - pattern.length) { return null;