From d2038f94c5a3d471efe4ce4b8529005e51c439f8 Mon Sep 17 00:00:00 2001 From: luofann Date: Sun, 29 Sep 2024 10:35:08 +0800 Subject: [PATCH 1/3] =?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=20#=20Reviewed,=20transaction=20id:=2019662?= 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 9f0e886d..7dc85f3b 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: 'bkitsm_csrftoken', + xsrfCookieName: `${BKAPP_CSRF_COOKIE_NAME}_csrftoken`, // cookie中的csrftoken信息名称 xsrfHeaderName: 'X-CSRFToken', withCredentials: true, From ce6322db8071d71ebec04284edaf7e3662aa312b Mon Sep 17 00:00:00 2001 From: luofann Date: Sun, 29 Sep 2024 10:39:02 +0800 Subject: [PATCH 2/3] =?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=20#=20Reviewed,=20transaction=20id:=2019665?= 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, From 22c47aa08a7548378c886680a4b5eff361079491 Mon Sep 17 00:00:00 2001 From: luofann Date: Sun, 29 Sep 2024 12:29:53 +0800 Subject: [PATCH 3/3] =?UTF-8?q?refactor:=20=E9=A1=B9=E7=9B=AE=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E9=89=B4=E6=9D=83=E4=BC=98=E5=8C=96=20--story=3D11985?= =?UTF-8?q?0967=20#=20Reviewed,=20transaction=20id:=2019671?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/pc/index.html | 1 + .../evaluation/EvaluationTicketContent.vue | 8 +- .../evaluation/EvaluationTicketModal.vue | 6 +- .../apiConfigure/apiTable.vue | 78 +++++++------------ .../apiConfigure/apiTree.vue | 56 ++++++------- frontend/pc/src/views/project/notice.vue | 31 +++++++- frontend/pc/src/views/service/serviceList.vue | 15 +++- 7 files changed, 111 insertions(+), 84 deletions(-) diff --git a/frontend/pc/index.html b/frontend/pc/index.html index 207bae3b..a4b9505f 100644 --- a/frontend/pc/index.html +++ b/frontend/pc/index.html @@ -37,6 +37,7 @@ window.BK_SHARED_RES_URL = "{{BK_SHARED_RES_URL}}" window.BK_PLATFORM_NAME = "{{BK_PLATFORM_NAME}}" window.VERSION = "{{VERSION}}" + window.BKAPP_CSRF_COOKIE_NAME = "{{BKAPP_CSRF_COOKIE_NAME}}"