import react from "@vitejs/plugin-react" import { defineConfig } from "vite" export default defineConfig({ plugins: [react()], server: { cors: true, proxy: { "/api": { target: "http://localhost:8080", changeOrigin: true, secure: false, // ← viktig for POST ws: false, configure: (proxy) => { proxy.on("proxyRes", (proxyRes) => { proxyRes.headers["Cache-Control"] = "no-cache" proxyRes.headers["Connection"] = "keep-alive" }) } } } } })