From 9047b5c824a93c6574b968c2dfc75952b28d6d70 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Tue, 11 Oct 2016 10:40:17 -0700 Subject: [PATCH] Fixed redirect setting --- app/backend/__tests__/network.test.js | 2 ++ app/backend/network.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/app/backend/__tests__/network.test.js b/app/backend/__tests__/network.test.js index 6cde22b8d..c805579b8 100644 --- a/app/backend/__tests__/network.test.js +++ b/app/backend/__tests__/network.test.js @@ -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: { diff --git a/app/backend/network.js b/app/backend/network.js index 5a78bd30b..8b658c6cd 100644 --- a/app/backend/network.js +++ b/app/backend/network.js @@ -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);