xieb
2025-01-15 1eda23a6bd69f80f2f3e0f2591002f6c1a0a38de
src/websocket/util/config.ts
@@ -14,7 +14,7 @@
export function getWebsocketUrl () {
  const token: string = localStorage.getItem(ELocalStorageKey.Token) || '' as string
  // const url = CURRENT_CONFIG.websocketURL
  const url = (window?.globalApiConfig?.baseUrl?.wsBaseUrl || import.meta.env.VITE_WS_API_URL) + '?x-auth-token=' + encodeURI(token)
  const url = (window?.globalApiConfig?.baseUrl?.wsBaseUrl || import.meta.env.VITE_WS_API_URL) + '?x-auth-token=' + encodeURI(token.replace('bearer ', ''))
  return url
}