We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea0ab5e commit 5baa141Copy full SHA for 5baa141
ui/src/request/index.ts
@@ -1,4 +1,4 @@
1
-import axios, { type AxiosRequestConfig } from 'axios'
+import axios, { type InternalAxiosRequestConfig, AxiosHeaders } from 'axios'
2
import { MsgError } from '@/utils/message'
3
import type { NProgress } from 'nprogress'
4
import type { Ref } from 'vue'
@@ -19,9 +19,9 @@ const instance = axios.create(axiosConfig)
19
20
/* 设置请求拦截器 */
21
instance.interceptors.request.use(
22
- (config: AxiosRequestConfig) => {
+ (config: InternalAxiosRequestConfig) => {
23
if (config.headers === undefined) {
24
- config.headers = {}
+ config.headers = new AxiosHeaders()
25
}
26
const { user } = useStore()
27
const token = user.getToken()
0 commit comments