UNPKG

209 BJavaScriptView Raw
1htmx.defineExtension('ajax-header', {
2 onEvent: function (name, evt) {
3 if (name === "htmx:configRequest") {
4 evt.detail.headers['X-Requested-With'] = 'XMLHttpRequest';
5 }
6 }
7});
\No newline at end of file