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>
20 lines
428 B
TypeScript
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,
|
|
},
|
|
})
|