Skip to content

Commit

Permalink
remove that port from the pattern (when is that ever useful?)
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Sprauer <[email protected]>
  • Loading branch information
MichaelSp committed Aug 29, 2018
1 parent 25bf89c commit cf3526f
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/middleware/serveProxies.js
Original file line number Diff line number Diff line change
@@ -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");

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit cf3526f

Please sign in to comment.