diff --git a/lib/adapters/http.js b/lib/adapters/http.js index d39a573a2a..52c40777d1 100755 --- a/lib/adapters/http.js +++ b/lib/adapters/http.js @@ -118,8 +118,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; }