Browse Source

feat(axios): 增加前端http请求头标识

pull/1013/head
colin 1 year ago
parent
commit
d28631e667
  1. 6
      apps/vue/src/utils/http/axios/index.ts

6
apps/vue/src/utils/http/axios/index.ts

@ -186,7 +186,11 @@ function createAxios(opt?: Partial<CreateAxiosOptions>) {
// 基础接口地址 // 基础接口地址
// baseURL: globSetting.apiUrl, // baseURL: globSetting.apiUrl,
headers: { 'Content-Type': ContentTypeEnum.JSON }, headers: {
'Content-Type': ContentTypeEnum.JSON,
// 取消后端cookie重定向
'X-Request-From': 'vben',
},
// 如果是form-data格式 // 如果是form-data格式
// headers: { 'Content-Type': ContentTypeEnum.FORM_URLENCODED }, // headers: { 'Content-Type': ContentTypeEnum.FORM_URLENCODED },
// 数据处理方式 // 数据处理方式

Loading…
Cancel
Save