提交 d509e897 编写于 作者: 无木

fix(axios): option `withToken` not work

上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册