BrainMinder/assets/static/js/htmx/ext/ajax-header.js
2024-08-22 10:13:16 +02:00

7 lines
209 B
JavaScript

htmx.defineExtension('ajax-header', {
onEvent: function (name, evt) {
if (name === "htmx:configRequest") {
evt.detail.headers['X-Requested-With'] = 'XMLHttpRequest';
}
}
});