在 Vite 配置中添加新的代理规则,支持 '/plugin_static' 路径的请求转发至本地 API

This commit is contained in:
jxxghp
2025-05-06 13:16:35 +08:00
parent 0568f8a85d
commit 05cc160311

View File

@@ -199,6 +199,12 @@ export default defineConfig({
secure: false,
cookieDomainRewrite: 'localhost',
},
'/plugin_static': {
target: 'http://localhost:3001',
changeOrigin: true,
secure: false,
rewrite: path => path.replace(/^\/plugin_static/, '/api/v1/plugin/file'),
},
},
},
css: {