Spaces:
Paused
Paused
dushyantsingh0 commited on
Commit ·
3aef1db
1
Parent(s): 515d292
fix: resolve white screen caused by relative URL resolution
Browse files30 unmodified lines3132333435363730 unmodified lines*/export const getWsUrl = (path: string) => {// Use the API's base URL as the source of truth for the domainconst apiBase = new URL(BASE_URL);const protocol = apiBase.protocol === 'https:' ? 'wss:' : 'ws:';// WebSockets are served from the root of the API server (no /api/v1 prefix)30 unmodified lines313233343536373830 unmodified lines*/export const getWsUrl = (path: string) => {// Use the API's base URL as the source of truth for the domain// We use window.location.origin as a fallback for relative BASE_URL pathsconst apiBase = new URL(BASE_URL, window.location.origin);const protocol = apiBase.protocol === 'https:' ? 'wss:' : 'ws:';// WebSockets are served from the root of the API server (no /api/v1 prefix)
frontend/packages/shared/src/utils/api.ts+2-1