Skip to content

Commit

Permalink
🐛 fix(http): github地址的处理
Browse files Browse the repository at this point in the history
  • Loading branch information
Teeoo committed Dec 19, 2021
1 parent 32ed344 commit 712993e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/boot/axios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string>('token') ?? ''}`
}
return Promise.resolve(request);
Expand Down

0 comments on commit 712993e

Please sign in to comment.