$.ajaxSetup({
dataFilter: function (data, type) {
var json_data = {};
try {
json_data = $.parseJSON(data);
} catch (e) {
json_data['invalid_token'] = 1;
}
if (json_data.invalid_token == 1) {
window.location.href = '{{ path('SOME_PATH') }}';
}
return data;
}
});
This entry was posted in Uncategorized. Bookmark the permalink.