Update Flex endpoint

This commit is contained in:
github-action[bot]
2025-01-15 14:29:55 +00:00
parent c564f57d8d
commit bd3f9f6c12
2 changed files with 161 additions and 4 deletions
+4 -4
View File
@@ -69,7 +69,7 @@
"",
"// Generate and double-submit a CSRF token in a form field and a cookie, as defined by Symfony's SameOriginCsrfTokenManager",
"document.addEventListener('submit', function (event) {",
" var csrfField = event.target.querySelector('input[data-controller=\"csrf-protection\"]');",
" var csrfField = event.target.querySelector('input[data-controller=\"csrf-protection\"], input[name=\"_csrf_token\"]');",
"",
" if (!csrfField) {",
" return;",
@@ -92,7 +92,7 @@
"// When @hotwired/turbo handles form submissions, send the CSRF token in a header in addition to a cookie",
"// The `framework.csrf_protection.check_header` config option needs to be enabled for the header to be checked",
"document.addEventListener('turbo:submit-start', function (event) {",
" var csrfField = event.detail.formSubmission.formElement.querySelector('input[data-controller=\"csrf-protection\"]');",
" var csrfField = event.detail.formSubmission.formElement.querySelector('input[data-controller=\"csrf-protection\"], input[name=\"_csrf_token\"]');",
"",
" if (!csrfField) {",
" return;",
@@ -107,7 +107,7 @@
"",
"// When @hotwired/turbo handles form submissions, remove the CSRF cookie once a form has been submitted",
"document.addEventListener('turbo:submit-end', function (event) {",
" var csrfField = event.detail.formSubmission.formElement.querySelector('input[data-controller=\"csrf-protection\"]');",
" var csrfField = event.detail.formSubmission.formElement.querySelector('input[data-controller=\"csrf-protection\"], input[name=\"_csrf_token\"]');",
"",
" if (!csrfField) {",
" return;",
@@ -151,7 +151,7 @@
"executable": false
}
},
"ref": "88bb6c47954903619ed36b2b3605909558dda424"
"ref": "889bfd9d173f8952e6d0885c2fa411968f30ec73"
}
}
}