Files
personaltwin-app/frontend/vite.config.js
2026-03-20 15:09:41 -04:00

22 lines
536 B
JavaScript

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
export default defineConfig({
plugins: [react()],
server: {
port: 5173,
proxy: {
// Proxy /api calls to Django — avoids CORS issues for API requests
'/api': {
target: 'http://localhost:8000',
changeOrigin: true,
},
// Proxy /o (OAuth endpoints) so token exchange POST avoids CORS preflight issues
'/o': {
target: 'http://localhost:8000',
changeOrigin: true,
},
},
},
})