fix: Add Vite proxy configuration for API requests - Configure proxy to forward /api requests to backend on localhost:3000 - Fixes export function receiving HTML instead of XML - Ensures frontend can properly communicate with backend API - Restart frontend dev server required for proxy to take effect

This commit is contained in:
Geert Rademakes 2025-08-06 12:58:58 +02:00
parent 4452a78b16
commit f3e91c5012

View File

@ -4,4 +4,13 @@ import react from '@vitejs/plugin-react'
// https://vite.dev/config/ // https://vite.dev/config/
export default defineConfig({ export default defineConfig({
plugins: [react()], plugins: [react()],
server: {
proxy: {
'/api': {
target: 'http://localhost:3000',
changeOrigin: true,
secure: false,
},
},
},
}) })