Files
hamview/ui/vite.config.ts
maze e83df1c143
Some checks failed
Test and build / Test and lint (push) Failing after 35s
Test and build / Build collector (push) Failing after 36s
Test and build / Build receiver (push) Failing after 36s
More APRS enhancements
2026-03-05 22:24:09 +01:00

28 lines
703 B
TypeScript

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import type { IncomingMessage } from 'http'
// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
server: {
host: '0.0.0.0',
proxy: {
'/api': {
target: 'http://localhost:8073',
changeOrigin: true,
router: (req: IncomingMessage) => {
const host = req.headers.host?.split(':')[0] || 'localhost';
return `http://${host}:8073`;
},
} as any,
'/broker': {
target: 'ws://10.42.23.73:8083',
ws: true,
changeOrigin: true,
rewrite: (path) => path.replace(/^\/broker/, ''),
},
},
},
})