go-guess/frontend/vite.config.ts
Daniel Noulet 98f47df8c1 feat: route API requests by tenant hostname
Derive local API origins and tenant headers from the browser hostname, allow tenant CORS preflights, and document the multi-tenant contract.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-01 17:49:42 +02:00

20 lines
428 B
TypeScript

import react from '@vitejs/plugin-react'
import { defineConfig } from 'vitest/config'
export default defineConfig({
plugins: [react()],
server: {
allowedHosts: ['nmbs.guess.local', 'ypto.guess.local'],
proxy: {
'/api': {
target: 'http://localhost:8080',
changeOrigin: true,
},
},
},
test: {
environment: 'jsdom',
setupFiles: './src/test/setup.ts',
css: true,
},
})