From 712993eabee24d30ea72954a9cccf3f526bb2344 Mon Sep 17 00:00:00 2001 From: Teeoo Date: Sun, 19 Dec 2021 13:06:48 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20fix(http):=20github=E5=9C=B0=E5=9D=80?= =?UTF-8?q?=E7=9A=84=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/boot/axios.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/boot/axios.ts b/src/boot/axios.ts index 1d0e46d..4a35ffa 100644 --- a/src/boot/axios.ts +++ b/src/boot/axios.ts @@ -14,7 +14,7 @@ const api = axios.create({ baseURL: process.env.baseURL }); api.interceptors.request.use( async (request) => { LoadingBar.start(); - if (LocalStorage.getItem('token')) { + if (request.url?.search('github') === -1 && LocalStorage.getItem('token')) { request.headers.Authorization = `token ${LocalStorage.getItem('token') ?? ''}` } return Promise.resolve(request);