diff options
Diffstat (limited to 'www/test/0.1.1/src/ext/ajax-header.js')
-rw-r--r-- | www/test/0.1.1/src/ext/ajax-header.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/www/test/0.1.1/src/ext/ajax-header.js b/www/test/0.1.1/src/ext/ajax-header.js new file mode 100644 index 00000000..5c6221bf --- /dev/null +++ b/www/test/0.1.1/src/ext/ajax-header.js @@ -0,0 +1,7 @@ +htmx.defineExtension('ajax-header', { + onEvent: function (name, evt) { + if (name === "htmx:configRequest") { + evt.detail.headers['X-Requested-With'] = 'XMLHttpRequest'; + } + } +});
\ No newline at end of file |