38 lines
875 B
JavaScript
38 lines
875 B
JavaScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
server: {
|
|
proxy: {
|
|
// Proxy API requests to backend - enables same-origin for session cookies
|
|
'/auth': {
|
|
target: 'http://localhost:8000',
|
|
changeOrigin: true,
|
|
secure: false,
|
|
},
|
|
'/api': {
|
|
target: 'http://localhost:8000',
|
|
changeOrigin: true,
|
|
secure: false,
|
|
},
|
|
'/login': {
|
|
target: 'http://localhost:8000',
|
|
changeOrigin: true,
|
|
secure: false,
|
|
},
|
|
'/register': {
|
|
target: 'http://localhost:8000',
|
|
changeOrigin: true,
|
|
secure: false,
|
|
},
|
|
'/logout': {
|
|
target: 'http://localhost:8000',
|
|
changeOrigin: true,
|
|
secure: false,
|
|
},
|
|
},
|
|
},
|
|
})
|