Commit d509e897 authored by 无木's avatar 无木

fix(axios): option `withToken` not work

parent 424b171e
......@@ -122,7 +122,7 @@ const transform: AxiosTransform = {
requestInterceptors: (config, options) => {
// 请求之前处理config
const token = getToken();
if (token && options?.requestOptions?.withToken !== false) {
if (token && (config as Recordable)?.requestOptions?.withToken !== false) {
// jwt token
config.headers.Authorization = options.authenticationScheme
? `${options.authenticationScheme} ${token}`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment