mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Don't set X-AJAX-Compat header when a request is made from Rhymix.ajax()
This commit is contained in:
parent
1568cb3790
commit
a339d88a2e
1 changed files with 1 additions and 4 deletions
|
|
@ -431,13 +431,10 @@ Rhymix.ajax = function(action, params, success, error) {
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Add CSRF token and AJAX compatibility hint
|
// Add a CSRF token.
|
||||||
const headers = {};
|
const headers = {};
|
||||||
if (action !== null) {
|
if (action !== null) {
|
||||||
headers['X-CSRF-Token'] = getCSRFToken();
|
headers['X-CSRF-Token'] = getCSRFToken();
|
||||||
if (!params['_rx_ajax_compat']) {
|
|
||||||
headers['X-AJAX-Compat'] = 'JSON';
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Send the AJAX request
|
// Send the AJAX request
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue