summaryrefslogtreecommitdiff
path: root/templates/js/admin.js
diff options
context:
space:
mode:
authorhaturatu <taro@eyes4you.org>2025-10-13 07:01:46 +0900
committerhaturatu <taro@eyes4you.org>2025-10-13 07:01:46 +0900
commitaf646a893e3b66b2b868d2d0f4216362477a4fba (patch)
tree4be49ae0140cb5b9849831333cbdccb0fdd279cc /templates/js/admin.js
parent18991704b375db4e8d22785bb47f3e2e12cd016f (diff)
support: xsrf
Diffstat (limited to 'templates/js/admin.js')
-rw-r--r--templates/js/admin.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/js/admin.js b/templates/js/admin.js
index 0b26e2f..fa67985 100644
--- a/templates/js/admin.js
+++ b/templates/js/admin.js
@@ -7,11 +7,11 @@
* @returns {Promise<Response>}
*/
async function fetchApi(url, options = {}) {
- const csrfToken = document.querySelector('meta[name="csrf-token"]').getAttribute('content');
+ const xsrfToken = document.querySelector('meta[name="xsrf-token"]').getAttribute('content');
options.headers = {
...options.headers,
- 'X-CSRF-Token': csrfToken
+ 'X-XSRF-Token': xsrfToken
};
// Set content type for methods that have a body.