Fix false CSRF validation errors
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user