MediaProcessing/apps/ui/web/vite.config.ts
2026-02-01 18:06:30 +01:00

24 lines
568 B
TypeScript

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"
})
}
}
}
}
})