mirror of
https://github.com/Shadowfita/docmost.git
synced 2025-11-25 06:01:02 +10:00
websocket updates
* sync page title on icon via websocket * sync on page tree too
This commit is contained in:
@ -13,7 +13,9 @@ const useCollaborationURL = (): string => {
|
||||
}
|
||||
*/
|
||||
|
||||
const API_URL = window.location.protocol + "//" + window.location.host;
|
||||
const API_URL = import.meta.env.DEV
|
||||
? "http://localhost:3000"
|
||||
: window.location.protocol + "//" + window.location.host;
|
||||
|
||||
const wsProtocol = API_URL.startsWith("https") ? "wss" : "ws";
|
||||
return `${wsProtocol}://${API_URL.split("://")[1]}${PATH}`;
|
||||
|
||||
Reference in New Issue
Block a user