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({ export default defineConfig({
plugins: plugins, plugins: plugins,
resolve: { resolve: {
@@ -84,17 +81,14 @@ export default defineConfig({
strictPort: true, strictPort: true,
proxy: { proxy: {
"/api": { "/api": {
target: _backendProxy, target: "http://127.0.0.1:8300",
changeOrigin: true, changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ""), rewrite: (path) => path.replace(/^\/api/, ""),
ws: true, ws: true,
proxyTimeout: 0, proxyTimeout: 0,
} }
}, },
allowedHosts: [ allowedHosts: ["beta.fromchat.ru"]
"beta.fromchat.ru",
...(_lan ? [_lan] : []),
]
}, },
appType: "spa", appType: "spa",
optimizeDeps: { optimizeDeps: {