From 4c9f1369c887f4a20c4bd32d1bb1f411e7536577 Mon Sep 17 00:00:00 2001 From: timolehto Date: Thu, 29 Jun 2017 17:55:12 +0300 Subject: [PATCH] Set Proxy-Authorization when needed (#1146) fixes #1145 --- nodes/core/io/21-httprequest.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nodes/core/io/21-httprequest.js b/nodes/core/io/21-httprequest.js index bc8c16a06..cd13824ae 100644 --- a/nodes/core/io/21-httprequest.js +++ b/nodes/core/io/21-httprequest.js @@ -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); } }