DEV: uses vanilla js to fetch csrf token instead of jquery (#16069)
This commit is contained in:
parent
c97b4d530a
commit
ca7f0ce461
|
@ -8,7 +8,10 @@ export default {
|
|||
initialize(container) {
|
||||
// Add a CSRF token to all AJAX requests
|
||||
let session = container.lookup("session:main");
|
||||
session.set("csrfToken", $("meta[name=csrf-token]").attr("content"));
|
||||
session.set(
|
||||
"csrfToken",
|
||||
document.head.querySelector("meta[name=csrf-token]")?.content
|
||||
);
|
||||
|
||||
if (!installed) {
|
||||
$.ajaxPrefilter(callbacks.fire);
|
||||
|
|
Loading…
Reference in New Issue