mooho-base-admin-plus 2.10.20 → 2.10.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/history.md CHANGED
@@ -191,3 +191,5 @@ mooho-base-admin-plus@2.10.17 - 内嵌表格默认增加行数可配置
191
191
  mooho-base-admin-plus@2.10.18 - 优化表格、表单、筛选项默认值
192
192
  mooho-base-admin-plus@2.10.19 - 解决标签控件值为null报错的bug
193
193
  mooho-base-admin-plus@2.10.20 - 修复上一版本bug
194
+ mooho-base-admin-plus@2.10.21 - 请求头增加后端请求主机地址,避免因反向代理引发无法获取真实地址的问题
195
+ mooho-base-admin-plus@2.10.22 - 修复上一版本的bug
@@ -19514,8 +19514,10 @@ service.interceptors.request.use(
19514
19514
  store.commit("admin/loader/start");
19515
19515
  let r = window.$mode === "development" ? Setting.apiBaseURL.dev : Setting.apiBaseURL.prd;
19516
19516
  a.url = r + a.url;
19517
- const o = util$2.cookies.get("token");
19518
- return a.headers.Authorization = "Bearer " + o, router && router.currentRoute && router.currentRoute.value && (a.headers["Frontend-Url"] = router.currentRoute.value.path), a;
19517
+ let o = r;
19518
+ r.startsWith("/") && (o = window.location.protocol + "//" + window.location.hostname, (window.location.port || "").trim() && (o = o + ":" + window.location.port)), a.headers["Request-Host"] = o;
19519
+ const s = util$2.cookies.get("token");
19520
+ return a.headers.Authorization = "Bearer " + s, router && router.currentRoute && router.currentRoute.value && (a.headers["Frontend-Url"] = router.currentRoute.value.path), a;
19519
19521
  },
19520
19522
  (a) => {
19521
19523
  console.log(a), Promise.reject(a);