Don't set X-AJAX-Compat header when a request is made from Rhymix.ajax()

This commit is contained in:
Kijin Sung 2025-05-25 16:47:17 +09:00
parent 1568cb3790
commit a339d88a2e

View file

@ -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