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

Prevent Following Redirect (#615) (#1684)

This commit is contained in:
Fabien Marchewka 2018-03-29 09:28:44 +02:00 committed by Dave Conway-Jones
parent ebb3fb96cd
commit 0d08dc410e
2 changed files with 5 additions and 0 deletions

View File

@ -88,6 +88,8 @@
<dt class="optional">rejectUnauthorized</dt>
<dd>If set to <code>true</code>, allows requests to be made to https sites that use
self signed certificates.</dd>
<dt class="optional">followRedirects</dt>
<dd>If set to <code>false</code> prevent following Redirect (HTTP 301).<code>true</code> by default</dd>
</dl>
<h3>Outputs</h3>
<dl class="message-properties">

View File

@ -108,6 +108,9 @@ module.exports = function(RED) {
}
}
}
if (msg.hasOwnProperty('followRedirects')) {
opts.followRedirects = msg.followRedirects;
}
if (msg.cookies) {
var cookies = [];
if (opts.headers.hasOwnProperty('cookie')) {