From 1927a337d43eb0574c2292952bfb2c4cc586756e Mon Sep 17 00:00:00 2001 From: luofann Date: Sun, 29 Sep 2024 10:39:02 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20csrftoken=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E5=8A=A8=E6=80=81=E8=8E=B7=E5=8F=96=20--stor?= =?UTF-8?q?y=3D119912007?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/pc/src/utils/ajax.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/pc/src/utils/ajax.js b/frontend/pc/src/utils/ajax.js index 7dc85f3b..a647b5a6 100644 --- a/frontend/pc/src/utils/ajax.js +++ b/frontend/pc/src/utils/ajax.js @@ -33,7 +33,7 @@ const instance = axios.create({ // `headers` are custom headers to be sent headers: { 'X-Requested-With': 'XMLHttpRequest' }, // csrftoken变量名 - xsrfCookieName: `${BKAPP_CSRF_COOKIE_NAME}_csrftoken`, + xsrfCookieName: `${window.BKAPP_CSRF_COOKIE_NAME}_csrftoken`, // cookie中的csrftoken信息名称 xsrfHeaderName: 'X-CSRFToken', withCredentials: true,