Skip to content

Node.js based forum software built for the modern web

closes #3587

barisusakli9361ff07729b
diff --git a/public/src/ajaxify.js b/public/src/ajaxify.js
index a2239dfbb2..d1d7ecb4be 100644
--- a/public/src/ajaxify.js
+++ b/public/src/ajaxify.js
@@ -124,7 +124,7 @@ $(document).ready(function() {
app.alertError('[[global:please_log_in]]');
app.previousUrl = url;
return ajaxify.go('login');
- } else if (status === 302) {
+ } else if (status === 302 || status === 308) {
if (data.responseJSON.external) {
window.location.href = data.responseJSON.external;
} else if (typeof data.responseJSON === 'string') {
diff --git a/src/controllers/helpers.js b/src/controllers/helpers.js
index 5486bcf009..ce1938ca30 100644
--- a/src/controllers/helpers.js
+++ b/src/controllers/helpers.js
@@ -39,7 +39,7 @@ helpers.notAllowed = function(req, res, error) {
helpers.redirect = function(res, url) {
if (res.locals.isAPI) {
- res.status(302).json(url);
+ res.status(308).json(url);
} else {
res.redirect(nconf.get('relative_path') + url);
}