chore(vite): 开发服务器允许所有 Host 访问(allowedHosts: true)

This commit is contained in:
liufumingren 2026-09-08 03:38:19 +08:00
parent 1bae275cef
commit f7dbc127cc

View File

@ -20,6 +20,8 @@ export default defineConfig({
server: {
port: 5174,
host: '0.0.0.0',
// 允许所有主机访问开发服务器(如 test.wms.com、局域网 IP 等)
allowedHosts: true,
proxy: {
'/dev-api': {
target: 'http://localhost:9528', // Assuming Vue 2 backend is running here, user can change