Request node: set followAllRedirects to work with POSTs

Fixes #2017
This commit is contained in:
Nick O'Leary
2021-04-07 14:35:29 +01:00
parent 449d76a6c7
commit 16e021e94f

View File

@@ -146,6 +146,7 @@ module.exports = function(RED) {
} }
if (msg.hasOwnProperty('followRedirects')) { if (msg.hasOwnProperty('followRedirects')) {
opts.followRedirect = msg.followRedirects; opts.followRedirect = msg.followRedirects;
opts.followAllRedirects = !!opts.followRedirect;
} }
var redirectList = []; var redirectList = [];
if (!opts.hasOwnProperty('followRedirect') || opts.followRedirect) { if (!opts.hasOwnProperty('followRedirect') || opts.followRedirect) {