import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' // https://vitejs.dev/config/ export default defineConfig({ plugins: [ react(), ], css: { postcss: './postcss.config.mjs', }, server: { host: '0.0.0.0', port: 5173, allowedHosts: [ 'localhost', '127.0.0.1', 'bsa.madeamess.online', '.madeamess.online' // Allow all subdomains ], headers: { 'Cross-Origin-Opener-Policy': 'same-origin-allow-popups' }, proxy: { '/api': { target: 'http://127.0.0.1:3000', changeOrigin: true, }, // Only proxy specific auth endpoints, not the callback route '/auth/setup': { target: 'http://127.0.0.1:3000', changeOrigin: true, }, '/auth/google/url': { target: 'http://127.0.0.1:3000', changeOrigin: true, }, '/auth/google/exchange': { target: 'http://127.0.0.1:3000', changeOrigin: true, }, '/auth/google/verify': { target: 'http://127.0.0.1:3000', changeOrigin: true, }, '/auth/me': { target: 'http://127.0.0.1:3000', changeOrigin: true, }, '/auth/logout': { target: 'http://127.0.0.1:3000', changeOrigin: true, }, '/auth/status': { target: 'http://127.0.0.1:3000', changeOrigin: true, }, }, }, })