1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-07-02 16:38:37 +00:00

Remove invalid CSRF HTML meta tag

This commit is contained in:
Frédéric Guillot 2021-05-31 13:44:34 -07:00 committed by fguillot
parent 1fd4c4ef13
commit 09be3d2bac
3 changed files with 7 additions and 10 deletions

View file

@ -30,9 +30,9 @@ class RequestBuilder {
}
getCsrfToken() {
let element = document.querySelector("meta[name=X-CSRF-Token]");
let element = document.querySelector("body[data-csrf-token");
if (element !== null) {
return element.getAttribute("value");
return element.dataset.csrfToken;
}
return "";