From 306fe8ae9832e617a82788e05b42d2724bd5d248 Mon Sep 17 00:00:00 2001 From: K <1175047471@qq.com> Date: Wed, 3 Apr 2024 13:58:31 +0800 Subject: [PATCH] chore: fix auth --- src/utils/http/axios/index.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/utils/http/axios/index.ts b/src/utils/http/axios/index.ts index f3e778f0..952f54d0 100644 --- a/src/utils/http/axios/index.ts +++ b/src/utils/http/axios/index.ts @@ -200,7 +200,7 @@ const transform: AxiosTransform = { // jwt token (config as Recordable).headers['DEFrame-Auth'] = options.authenticationScheme ? `${options.authenticationScheme} ${token}` - : `bearer ${token}` + : `${token}` } // 设置租户 const tenantId = getTenantId() @@ -275,9 +275,7 @@ function createAxios(opt?: Partial) { deepMerge( { // See https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication#authentication_schemes - // authentication schemes,e.g: Bearer - // authenticationScheme: 'Bearer', - authenticationScheme: 'Bearer', + authenticationScheme: 'bearer', timeout: 10 * 1000, // 基础接口地址 // baseURL: globSetting.apiUrl,