mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2026-05-10 02:37:56 +08:00
fresh available
This commit is contained in:
@@ -8,7 +8,7 @@ export const baseUrl = '/bison/api/'
|
||||
axios.interceptors.request.use(function (config) {
|
||||
if (config.url && config.url.startsWith(baseUrl) && config.url !== `${baseUrl}auth`
|
||||
&& config.url !== `${baseUrl}global_conf`) {
|
||||
const token = sessionStorage.getItem('token');
|
||||
const token = localStorage.getItem('token');
|
||||
if (token) {
|
||||
config.headers['Authorization'] = `Bearer ${token}`;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user