Codex's updates...

This commit is contained in:
2026-10-18 19:27:17 -04:00
parent a1643eb1b7
commit 02223083f6
338 changed files with 14757 additions and 7986 deletions
+14
View File
@@ -1,3 +1,17 @@
// Attach the session CSRF token to existing forms and same-origin AJAX requests.
$.ajaxPrefilter(function (options, original, xhr) {
if (!options.crossDomain && !/^(GET|HEAD|OPTIONS)$/i.test(options.type)) {
xhr.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').attr('content') || '');
}
});
$(function () {
$('form[method="post" i]').each(function () {
if (!$(this).find('[name="csrf_token"]').length) {
$('<input>', {type: 'hidden', name: 'csrf_token', value: $('meta[name="csrf-token"]').attr('content') || ''}).appendTo(this);
}
});
});
// ==============
// Base Functions