Revert using LAN in vite config

This commit is contained in:
2026-04-27 20:28:59 +03:00
Unverified
parent c7f4eb8a48
commit 2656c826cf
+2 -8
View File
@@ -66,9 +66,6 @@ if (process.env.VITE_ELECTRON) {
);
}
const _lan = process.env.LAN_IP;
const _backendProxy = _lan ? `http://${_lan}:8300/` : "http://127.0.0.1:8300/";
export default defineConfig({
plugins: plugins,
resolve: {
@@ -84,17 +81,14 @@ export default defineConfig({
strictPort: true,
proxy: {
"/api": {
target: _backendProxy,
target: "http://127.0.0.1:8300",
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ""),
ws: true,
proxyTimeout: 0,
}
},
allowedHosts: [
"beta.fromchat.ru",
...(_lan ? [_lan] : []),
]
allowedHosts: ["beta.fromchat.ru"]
},
appType: "spa",
optimizeDeps: {