Compare commits
No commits in common. "04738fae915115d5341b7cbf06b039aabb0ab454" and "c411142840782851e4aa60d9f46c7acf931e7a11" have entirely different histories.
04738fae91
...
c411142840
|
|
@ -1,35 +1,30 @@
|
|||
import { defineConfig, loadEnv } from 'vite'
|
||||
import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
import svgr from 'vite-plugin-svgr'
|
||||
|
||||
export default defineConfig(({ mode }) => {
|
||||
// Загружаем переменные окружения
|
||||
const env = loadEnv(mode, process.cwd())
|
||||
|
||||
return {
|
||||
plugins: [react(), svgr()],
|
||||
server: {
|
||||
host: true,
|
||||
allowedHosts: ['dev.msf.enode', 'demo-msf.kis-npo.ru'],
|
||||
proxy: {
|
||||
'/ai-api': {
|
||||
target: env.VITE_AI_API_URL || 'http://192.168.2.39:5134',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/ai-api/, ''),
|
||||
},
|
||||
'/metrics-ws': {
|
||||
target: env.VITE_WS_URL || 'ws://192.168.2.39:3001',
|
||||
ws: true,
|
||||
changeOrigin: true,
|
||||
},
|
||||
'/api': {
|
||||
target: env.VITE_API_URL || 'http://192.168.2.39:3000',
|
||||
changeOrigin: true,
|
||||
bypass(req, res, options) {
|
||||
console.log('Proxying request:', req.url);
|
||||
}
|
||||
export default defineConfig({
|
||||
plugins: [react(), svgr()],
|
||||
server: {
|
||||
host: true,
|
||||
allowedHosts: ['dev.msf.enode', 'demo-msf.kis-npo.ru'],
|
||||
proxy: {
|
||||
'/ai-api': {
|
||||
target: 'http://192.168.2.39:5134',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/ai-api/, ''),
|
||||
},
|
||||
'/metrics-ws': {
|
||||
target: 'ws://192.168.2.39:3001',
|
||||
ws: true,
|
||||
changeOrigin: true,
|
||||
},
|
||||
'/api': {
|
||||
target: 'http://192.168.2.39:3000',
|
||||
changeOrigin: true,
|
||||
bypass(req, res, options) {
|
||||
console.log('Proxying request:', req.url);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue