mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
fix: ws prefix url in electron (#1896)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { config } from '@affine/env';
|
||||
import { config, websocketPrefixUrl } from '@affine/env';
|
||||
import { KeckProvider } from '@affine/workspace/affine/keck';
|
||||
import {
|
||||
getLoginStorage,
|
||||
@@ -41,11 +41,8 @@ const createAffineWebSocketProvider = (
|
||||
apis.disconnect();
|
||||
apis.connect();
|
||||
});
|
||||
const wsUrl = `${
|
||||
window.location.protocol === 'https:' ? 'wss' : 'ws'
|
||||
}://${window.location.host}/api/sync/`;
|
||||
webSocketProvider = new KeckProvider(
|
||||
wsUrl,
|
||||
websocketPrefixUrl + '/api/sync/',
|
||||
blockSuiteWorkspace.id,
|
||||
blockSuiteWorkspace.doc,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user