import type { ProxyOptions } from "vite"; /** Preserve the public origin used by FastAPI to construct the speech WebSocket URL. */ export function createBackendProxy(target: string): Record { const http: ProxyOptions = { target, changeOrigin: false }; return { "/api": http, "/v1/realtime": { ...http, ws: true }, "/docs": http, "/redoc": http, "/openapi.json": http, "/project": http, "/public/docs.html": http, }; }