Files
Shadowbroker/frontend/src/lib/cctvProxy.ts
T
2026-05-01 22:56:50 -06:00

7 lines
237 B
TypeScript

/** Proxy external CCTV URLs through the backend to bypass CORS. */
export function buildCctvProxyUrl(rawUrl: string): string {
return rawUrl.startsWith('http')
? `/api/cctv/media?url=${encodeURIComponent(rawUrl)}`
: rawUrl;
}