mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-18 03:31:03 +01:00
updated ajaxify 5xx handling code to work even if nginx is used as a proxy (as it serves back 502, not 500)
This commit is contained in:
@@ -103,8 +103,11 @@ $(document).ready(function() {
|
||||
|
||||
if (data) {
|
||||
var status = parseInt(data.status, 10);
|
||||
if (status === 403 || status === 404 || status === 500 || status === 502) {
|
||||
if (status === 502) {
|
||||
status = 500;
|
||||
}
|
||||
|
||||
if (status === 403 || status === 404 || status === 500) {
|
||||
$('#footer, #content').removeClass('hide').addClass('ajaxifying');
|
||||
return renderTemplate(url, status.toString(), data.responseJSON, (new Date()).getTime(), callback);
|
||||
} else if (status === 401) {
|
||||
|
||||
Reference in New Issue
Block a user