diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in index 2c4a9f3025d..334ec139feb 100644 --- a/etc/RT_Config.pm.in +++ b/etc/RT_Config.pm.in @@ -1818,6 +1818,15 @@ reason, add this to config: See also L. +=item C<$HtmxLogAll> + +Turns on logging of all HTMX requests. This is useful for debugging +HTMX requests and responses. + +=cut + +Set($HtmxLogAll, 0); + =back diff --git a/share/html/Elements/HeaderJavascript b/share/html/Elements/HeaderJavascript index 6f7e91817ff..e846af6c4e3 100644 --- a/share/html/Elements/HeaderJavascript +++ b/share/html/Elements/HeaderJavascript @@ -73,4 +73,8 @@ else { @js_files = "/NoAuth/js/squished-$key.js"; } +if ( RT->Config->Get('HtmxLogAll') ) { + push @js_files, "/static/js/htmx-log-all.js"; +} + diff --git a/share/static/js/htmx-log-all.js b/share/static/js/htmx-log-all.js new file mode 100644 index 00000000000..be0b753fc12 --- /dev/null +++ b/share/static/js/htmx-log-all.js @@ -0,0 +1 @@ +htmx.logAll();