21 lines
644 B
TypeScript
21 lines
644 B
TypeScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
|
|
// Proxy API + realtime through the dev server so the browser talks to a single
|
|
// origin (localhost:5173). This lets the httpOnly refresh cookie work over http
|
|
// with SameSite=Lax instead of requiring cross-origin SameSite=None; Secure.
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
server: {
|
|
host: true,
|
|
port: 5173,
|
|
proxy: {
|
|
'/api': { target: 'http://localhost:8080', changeOrigin: true },
|
|
'/connection/websocket': {
|
|
target: 'http://localhost:8080',
|
|
changeOrigin: true,
|
|
ws: true,
|
|
},
|
|
},
|
|
},
|
|
});
|