mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: Add Websocket prefix settings (#449)
This commit is contained in:
1 parent
39e3d057fa
commit
0c587d1786
11 files changed
+14
-10
No files matched your search
@@ -37,7 +37,7 @@ const onmessage = (msg) => {
|
||||
return true;
|
||||
};
|
||||
|
||||
const url = new URL('/home/messages-conn', window.location.href);
|
||||
const url = new URL(`${UiContext.ws_prefix}home/messages-conn`, window.location.href);
|
||||
// TODO handle a better way for cookie
|
||||
url.searchParams.append('sid', document.cookie);
|
||||
const endpoint = url.toString().replace('http', 'ws');
|
||||
|
||||
Reference in new issue
Block a user