BrainMinder/assets/static/js/htmx/ext/ajax-header.js

7 lines
209 B
JavaScript
Raw Normal View History

2024-08-22 10:13:16 +02:00
htmx.defineExtension('ajax-header', {
onEvent: function (name, evt) {
if (name === "htmx:configRequest") {
evt.detail.headers['X-Requested-With'] = 'XMLHttpRequest';
}
}
});