Add api proxy

This commit is contained in:
= 2024-12-06 02:50:16 +01:00
parent 2adacceac5
commit e2261f829c
3 changed files with 43 additions and 11 deletions

View file

@ -4,4 +4,13 @@ import react from '@vitejs/plugin-react'
// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
server: {
proxy: {
'/api': {
target: 'http://localhost:2486',
changeOrigin: true,
rewrite: path => path.replace(/^\/api/, '')
}
}
}
})