chore(dev): 支持本地后端代理目标

This commit is contained in:
xy
2026-09-28 20:37:09 +08:00
parent 8024075439
commit b6775a66c7
4 changed files with 6 additions and 4 deletions
+2 -1
View File
@@ -11,6 +11,7 @@ function resolveBuildId() {
// https://vite.dev/config/
export default defineConfig(() => {
const buildId = resolveBuildId()
const apiProxyTarget = process.env.VITE_API_PROXY_TARGET?.trim() || 'https://ipad.shenynet.com'
return {
plugins: [vue()],
@@ -26,7 +27,7 @@ export default defineConfig(() => {
server: {
proxy: {
'/api': {
target: 'https://ipad.shenynet.com',
target: apiProxyTarget,
changeOrigin: true,
secure: true,
},