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({
|
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: {
|
||||||
|
|||||||
Reference in New Issue
Block a user