mirror of
http://172.20.10.11:3000/gitadmin/INSIGHT-MVP.git
synced 2026-06-25 00:16:41 +02:00
- Add @SkipThrottle() to POST /auth/refresh so repeated silent-refresh calls from page reloads no longer exhaust the rate limit (HTTP 429) - Configure Vite HMR explicitly with host/clientPort/protocol=wss so the WebSocket connects correctly through Traefik instead of reconnecting every ~1s Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
36 lines
698 B
TypeScript
36 lines
698 B
TypeScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import path from 'path';
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
},
|
|
},
|
|
server: {
|
|
port: 8080,
|
|
host: true,
|
|
allowedHosts: ['.xinion.lan'],
|
|
hmr: {
|
|
host: 'insight.xinion.lan',
|
|
clientPort: 443,
|
|
protocol: 'wss',
|
|
},
|
|
proxy: {
|
|
'/api/v1/crm': {
|
|
target: 'http://localhost:3100',
|
|
changeOrigin: true,
|
|
},
|
|
'/api': {
|
|
target: 'http://localhost:3000',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
build: {
|
|
outDir: 'dist',
|
|
sourcemap: true,
|
|
},
|
|
});
|