summaryrefslogtreecommitdiffstatshomepage
path: root/www/static/src/ext/ajax-header.js
blob: 5c6221bf6c12d747f20cedc27677639303e4bb02 (plain) (blame)
1
2
3
4
5
6
7
htmx.defineExtension('ajax-header', {
    onEvent: function (name, evt) {
        if (name === "htmx:configRequest") {
            evt.detail.headers['X-Requested-With'] = 'XMLHttpRequest';
        }
    }
});