mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 12:55:00 +00:00
fix: ws prefix url in electron (#1896)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { websocketPrefixUrl } from '@affine/env';
|
||||
import { KeckProvider } from '@affine/workspace/affine/keck';
|
||||
import { getLoginStorage } from '@affine/workspace/affine/login';
|
||||
import type { AffineWebSocketProvider } from '@affine/workspace/type';
|
||||
@@ -19,11 +20,8 @@ const createAffineWebSocketProvider = (
|
||||
webSocketProvider = null;
|
||||
},
|
||||
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