diff --git a/lib/adapters/http.js b/lib/adapters/http.js index d3b1191a33..d163a2051d 100755 --- a/lib/adapters/http.js +++ b/lib/adapters/http.js @@ -121,8 +121,7 @@ module.exports = function httpAdapter(config) { return true; } if (proxyElement[0] === '.' && - parsed.hostname.substr(parsed.hostname.length - proxyElement.length) === proxyElement && - proxyElement.match(/\./g).length === parsed.hostname.match(/\./g).length) { + parsed.hostname.substr(parsed.hostname.length - proxyElement.length) === proxyElement) { return true; }