This commit is contained in:
Mrx
2026-02-28 12:18:33 +08:00
parent 576ab0c362
commit 030ed260c1
6 changed files with 98 additions and 83 deletions

View File

@@ -15,8 +15,8 @@ export default defineConfig({
strictPort: true, // 如果端口被占用则抛出错误而不是使用下一个可用端口
proxy: {
"/api/v1": {
target: "http://127.0.0.1:8888", // 本地接口地址
// target: "https://www.onecha.cn", // 修改为带 www 的域名,避免 301 重定向
// target: "http://127.0.0.1:8888", // 本地接口地址
target: "https://www.onecha.cn", // 修改为带 www 的域名,避免 301 重定向
changeOrigin: true,
rewrite: (path) => path, // 可选:确保路径不被修改
},