We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d30fcf2 commit 4a36ae2Copy full SHA for 4a36ae2
src/utils/api-ws.ts
@@ -9,10 +9,7 @@ import { getToken } from './api';
9
10
export type * from './api';
11
12
-export function getWsBase(): string {
13
- // We use the `baseURI` (from `<base/>` in index.html) to build the URL, which is corrected by httpd/nginx
14
- return document.baseURI.replace(/^http(s?):\/\//, 'ws$1://').replace(/\/+$/, '') + import.meta.env.VITE_WS_GATEWAY;
15
-}
+export const getWsBase = () => document.baseURI.replace(/^http:\/\//, 'ws://').replace(/^https:\/\//, 'wss://');
16
17
export function getUrlWithToken(baseUrl: string): string {
18
const querySymbol = baseUrl.includes('?') ? '&' : '?';
0 commit comments