perf: 支持反向代理增加contextPath路径

This commit is contained in:
xiaojunnuo
2025-04-25 18:04:59 +08:00
parent b3468cf7f2
commit 0088929622
11 changed files with 21 additions and 22 deletions
@@ -21,6 +21,6 @@ const props = defineProps<{
}>();
const nslookupCmd = computed(() => {
return `nslookup -qa=txt _acme-challenge.${props.record.domain}`;
return `nslookup -q=txt _acme-challenge.${props.record.domain}`;
});
</script>
@@ -161,10 +161,10 @@ export const useSettingStore = defineStore({
//@ts-ignore
if (this.isComm) {
if (siteInfo.logo) {
siteInfo.logo = `/api/basic/file/download?key=${siteInfo.logo}`;
siteInfo.logo = `api/basic/file/download?key=${siteInfo.logo}`;
}
if (siteInfo.loginLogo) {
siteInfo.loginLogo = `/api/basic/file/download?key=${siteInfo.loginLogo}`;
siteInfo.loginLogo = `api/basic/file/download?key=${siteInfo.loginLogo}`;
}
}
this.siteInfo = _.merge({}, defaultSiteInfo, siteInfo);
@@ -7,7 +7,7 @@
<a-descriptions title="" bordered>
<a-descriptions-item label="用户名">{{ userInfo.username }}</a-descriptions-item>
<a-descriptions-item label="头像">
<a-avatar v-if="userInfo.avatar" size="large" :src="'/api/basic/file/download?&key=' + userInfo.avatar" style="background-color: #eee"> </a-avatar>
<a-avatar v-if="userInfo.avatar" size="large" :src="'api/basic/file/download?&key=' + userInfo.avatar" style="background-color: #eee"> </a-avatar>
<a-avatar v-else size="large" style="background-color: #00b4f5">
{{ userInfo.username }}
</a-avatar>
@@ -3,7 +3,7 @@
<div class="header-profile flex-wrap bg-white dark:bg-black">
<div class="flex flex-1">
<div class="avatar">
<a-avatar v-if="userInfo.avatar" size="large" :src="'/api/basic/file/download?&key=' + userInfo.avatar" style="background-color: #eee"> </a-avatar>
<a-avatar v-if="userInfo.avatar" size="large" :src="'api/basic/file/download?&key=' + userInfo.avatar" style="background-color: #eee"> </a-avatar>
<a-avatar v-else size="large" style="background-color: #00b4f5">
{{ userInfo.username }}
</a-avatar>
@@ -28,7 +28,7 @@ function onChange(value: string) {
const imageCodeUrl = ref();
function resetImageCode() {
const randomStr = nanoid(10);
let url = "/api/basic/code/captcha";
let url = "api/basic/code/captcha";
imageCodeUrl.value = url + "?randomStr=" + randomStr;
emit("update:randomStr", randomStr);
}
@@ -164,7 +164,7 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
width: "auto",
},
buildUrl(key: string) {
return `/api/basic/file/download?&key=` + key;
return `api/basic/file/download?&key=` + key;
},
},
},
@@ -190,7 +190,7 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
},
},
buildUrl(key: string) {
return `/api/basic/file/download?&key=` + key;
return `api/basic/file/download?&key=` + key;
},
},
},