1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Set Proxy-Authorization when needed (#1146)

fixes #1145
This commit is contained in:
timolehto 2017-06-29 17:55:12 +03:00 committed by Nick O'Leary
parent adca1d7855
commit 4c9f1369c8

View File

@ -188,6 +188,9 @@ module.exports = function(RED) {
opts.headers = heads;
opts.method = method;
urltotest = match[0];
if (opts.auth) {
opts.headers['Proxy-Authorization'] = "Basic "+new Buffer(opts.auth).toString('Base64')
}
}
else { node.warn("Bad proxy url: "+process.env.http_proxy); }
}