mirror of
https://github.com/discourse/discourse.git
synced 2025-02-06 11:28:18 +00:00
Revert "fix tests, crsf token meta is not present on tests (#7733)"
This reverts commit 240b61e844ebcd308386a0e6ed737066d7f4a4fb.
This commit is contained in:
parent
8cd13b22a1
commit
ebecd0b7d1
@ -4,10 +4,10 @@ export default {
|
||||
|
||||
initialize(container) {
|
||||
const session = container.lookup("session:main");
|
||||
const meta = document.querySelector("meta[name=csrf-token]");
|
||||
|
||||
if (meta) {
|
||||
const csrfToken = meta.getAttribute("content");
|
||||
const csrfToken = document
|
||||
.querySelector("meta[name=csrf-token]")
|
||||
.getAttribute("content");
|
||||
|
||||
// Add a CSRF token to all AJAX requests
|
||||
session.set("csrfToken", csrfToken);
|
||||
@ -18,5 +18,4 @@ export default {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user