Fixed redirect setting

This commit is contained in:
Gregory Schier 2016-10-11 10:40:17 -07:00
parent 741278a05b
commit 9047b5c824
2 changed files with 4 additions and 0 deletions

View File

@ -17,6 +17,7 @@ describe('buildRequestConfig()', () => {
expect(config).toEqual({
body: '',
followAllRedirects: true,
followRedirect: true,
forever: true,
gzip: true,
headers: {host: ''},
@ -50,6 +51,7 @@ describe('buildRequestConfig()', () => {
expect(config).toEqual({
body: 'foo=bar',
followAllRedirects: true,
followRedirect: true,
forever: true,
gzip: true,
headers: {

View File

@ -26,6 +26,7 @@ export function _buildRequestConfig (renderedRequest, patch = {}) {
// Setup redirect rules
followAllRedirects: true,
followRedirect: true,
maxRedirects: 20,
timeout: 0,
@ -74,6 +75,7 @@ export function _actuallySend (renderedRequest, settings) {
jar: null, // We're doing our own cookies
proxy: proxy,
followAllRedirects: settings.followRedirects,
followRedirect: settings.followRedirects,
timeout: settings.timeout > 0 ? settings.timeout : null,
rejectUnauthorized: settings.validateSSL
}, true);