secruity usw

This commit is contained in:
2026-04-09 10:34:47 +02:00
parent c7491f9af5
commit 792f9bb2a6
5 changed files with 262 additions and 207 deletions

View File

@@ -1,7 +1,20 @@
import { defineConfig } from 'vite'
import { defineConfig, loadEnv } from 'vite'
import react from '@vitejs/plugin-react'
// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
})
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '')
return {
plugins: [react()],
server: {
port: 8080,
host: true,
proxy: {
'/api': {
target: env.VITE_API_TARGET || 'http://localhost:5173',
changeOrigin: true,
}
}
}
}
})