From aa8ff06b6f8eea9384f43f1dbb5ed567bb2bfe4f Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Thu, 15 Dec 2022 23:40:04 -0800 Subject: [PATCH] try setting CSRFPreventionToken header --- scripts/utils.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/scripts/utils.js b/scripts/utils.js index 0c8b8e5..428fff5 100644 --- a/scripts/utils.js +++ b/scripts/utils.js @@ -12,6 +12,22 @@ export class NetworkError extends Error { } } +function getCookie(cname) { + let name = cname + "="; + let decodedCookie = decodeURIComponent(document.cookie); + let ca = decodedCookie.split(';'); + for(let i = 0; i