Use a custom header instead
This commit is contained in:
Peter Jaszkowiak
2017-06-30 23:38:31 -06:00
parent 02c679d5c9
commit 6cb8440715
3 changed files with 13 additions and 3 deletions

View File

@@ -293,11 +293,21 @@ $(document).ready(function () {
headers: {
'X-Return-To': app.previousUrl,
},
success: function (data) {
success: function (data, textStatus, xhr) {
if (!data) {
return;
}
if (xhr.getResponseHeader('X-Redirect')) {
return callback({
data: {
status: 302,
responseJSON: data,
},
textStatus: 'error',
});
}
ajaxify.data = data;
data.config = config;