From cf5a4af6236594e305a364e7d8965f8ac3807c6d Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Thu, 29 May 2025 21:19:39 +0800 Subject: [PATCH] chore: remove duplicated auth header --- dashboard/src/views/ChatPage.vue | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/dashboard/src/views/ChatPage.vue b/dashboard/src/views/ChatPage.vue index d260c0766..7069a81f4 100644 --- a/dashboard/src/views/ChatPage.vue +++ b/dashboard/src/views/ChatPage.vue @@ -282,10 +282,7 @@ export default { try { const response = await axios.get('/api/chat/get_file', { params: { filename }, - responseType: 'blob', - headers: { - 'Authorization': 'Bearer ' + localStorage.getItem('token') - } + responseType: 'blob' }); const blobUrl = URL.createObjectURL(response.data); @@ -433,8 +430,7 @@ export default { try { const response = await axios.post('/api/chat/post_file', formData, { headers: { - 'Content-Type': 'multipart/form-data', - 'Authorization': 'Bearer ' + localStorage.getItem('token') + 'Content-Type': 'multipart/form-data' } }); @@ -460,8 +456,7 @@ export default { try { const response = await axios.post('/api/chat/post_image', formData, { headers: { - 'Content-Type': 'multipart/form-data', - 'Authorization': 'Bearer ' + localStorage.getItem('token') + 'Content-Type': 'multipart/form-data' } });