From e66cf54a2eedd4030997ee9ecc3d9dd440b0eacf Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Thu, 15 Dec 2022 23:51:51 -0800 Subject: [PATCH] remove csrf token from cookie --- scripts/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/utils.js b/scripts/utils.js index d61b72d..8d05dc4 100644 --- a/scripts/utils.js +++ b/scripts/utils.js @@ -57,7 +57,7 @@ export async function request (path, method, body = null, auth = true) { content.headers.CSRFPreventionToken = getCookie("CSRFPreventionToken"); } if(auth) { - content.headers.Cookie = document.cookie; + content.headers.Cookie = `PVEAuthCookie=${getCookie("PVEAuthCookie")}`; } let response = await fetch(`https://pve.tronnet.net/api2/json${path}`, content)