0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00

Fixed invalid websocket address on https sites

no issue

- there was an errant space after the `wss:` protocol used when building the websockets URL for multiplayer that caused errors when trying to connect
This commit is contained in:
Kevin Ansfield 2023-04-13 10:15:52 +01:00
parent 1d19021606
commit d7af4be7e5
No known key found for this signature in database

View file

@ -358,7 +358,7 @@ export default class KoenigLexicalEditor extends Component {
// - figure out how to re-render the component when its props change
// - figure out some other mechanism for handling posts that don't really exist yet with multiplayer
const enableMultiplayer = this.feature.lexicalMultiplayer && !cardConfig.post.isNew;
const multiplayerWsProtocol = window.location.protocol === 'https:' ? `wss: ` : `ws:`;
const multiplayerWsProtocol = window.location.protocol === 'https:' ? `wss:` : `ws:`;
const multiplayerEndpoint = multiplayerWsProtocol + window.location.host + this.ghostPaths.url.api('posts', 'multiplayer');
const multiplayerDocId = cardConfig.post.id;
const multiplayerUsername = this.session.user.name;