mirror of
https://github.com/fromchat-messenger/web.git
synced 2026-09-22 19:15:08 +03:00
Revert using LAN in vite config
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user