diff options
Diffstat (limited to 'assets/js/core')
-rw-r--r-- | assets/js/core/http.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/assets/js/core/http.js b/assets/js/core/http.js index 21200a0f..745435cc 100644 --- a/assets/js/core/http.js +++ b/assets/js/core/http.js @@ -4,6 +4,7 @@ KB.http.request = function (method, url, headers, body) { function parseResponse(request) { var redirect = request.getResponseHeader('X-Ajax-Redirect'); + var location = request.getResponseHeader('Location'); if (redirect === 'self') { window.location.reload(); @@ -11,6 +12,8 @@ KB.http.request = function (method, url, headers, body) { window.location = redirect.split('#')[0]; } else if (redirect) { window.location = redirect; + } else if (location) { + window.location = location; } else if (request.getResponseHeader('Content-Type') === 'application/json') { try { return JSON.parse(request.responseText); |