mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
http-request node - relax proxy regex check to let userid:password through
This commit is contained in:
parent
3c2d32b867
commit
6ccb05cb2c
@ -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];
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user