chore(frontend): scaffold Vite React TypeScript application
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import type { ProxyOptions } from "vite";
|
||||
|
||||
/** Preserve the public origin used by FastAPI to construct the speech WebSocket URL. */
|
||||
export function createBackendProxy(target: string): Record<string, ProxyOptions> {
|
||||
const http: ProxyOptions = { target, changeOrigin: false };
|
||||
return {
|
||||
"/api": http,
|
||||
"/v1/realtime": { ...http, ws: true },
|
||||
"/docs": http,
|
||||
"/redoc": http,
|
||||
"/openapi.json": http,
|
||||
"/oauth": http,
|
||||
"/project": http,
|
||||
"/public/docs.html": http,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user