Fix false CSRF validation errors

This commit is contained in:
Mikei386
2026-06-13 23:55:07 +02:00
parent 93e28030a0
commit d14dd51584
8 changed files with 13 additions and 18 deletions
+1 -1
View File
@@ -64,7 +64,7 @@
const api = async (path, options = {}) => {
const response = await fetch(`${root.dataset.api}?path=${encodeURIComponent(path)}`, {
...options,
headers: {'Content-Type':'application/json', 'X-CSRF-Token':window.BACKUPPER_CSRF || '', ...(options.headers || {})}
headers: {'Content-Type':'application/json', 'X-CSRF-Token':window.BACKUPPER_CSRF || window.csrf_token || '', ...(options.headers || {})}
});
const text = await response.text();
let body = null;