diff --git a/nodes/core/io/21-httpin.js b/nodes/core/io/21-httpin.js index ce6c4d112..e25298bd1 100644 --- a/nodes/core/io/21-httpin.js +++ b/nodes/core/io/21-httpin.js @@ -270,12 +270,13 @@ module.exports = function(RED) { } } if (prox && !noproxy) { - var match = prox.match(/^(http:\/\/)?([^:\/]+)(:([0-9]+))?/i); + var match = prox.match(/^(http:\/\/)?(.+)?:([0-9]+)?/i); + console.log("MATCH",match); if (match) { opts.protocol = "http:"; opts.headers['Host'] = opts.host; opts.host = opts.hostname = match[2], - opts.port = (match[4] != null ? match[4] : 80), + opts.port = (match[3] != null ? match[3] : 80), opts.path = opts.pathname = opts.href; urltotest = match[2]; } diff --git a/settings.js b/settings.js index 68fcda7cb..0073fdfe7 100644 --- a/settings.js +++ b/settings.js @@ -121,10 +121,11 @@ module.exports = { //}, // If you need to set an http proxy please set an environment variable - // called http_proxy outside of Node-RED in the operating system. + // called http_proxy (or HTTP_PROXY) outside of Node-RED in the operating system. // For example - http_proxy=http://myproxy.com:8080 // (Setting it here will have no effect) - + // You may also specify no_proxy (or NO_PROXY) to supply a comma separated + // list of domains to not proxy, eg - no_proxy=.acme.co,.acme.co.uk // The following property can be used to add a custom middleware function // in front of all http in nodes. This allows custom authentication to be