mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Use wss for web socket when using a https connection
This commit is contained in:
@@ -58,9 +58,10 @@ export class StashService {
|
||||
const platformUrl = new URL(platform.location.origin);
|
||||
platformUrl.port = platformUrl.protocol === 'https:' ? '9999' : '9998';
|
||||
const url = platformUrl.toString().slice(0, -1);
|
||||
const webSocketScheme = platformUrl.protocol === 'https:' ? 'wss' : 'ws';
|
||||
|
||||
const wsLink = new WebSocketLink({
|
||||
uri: `ws://${platform.location.hostname}:${platformUrl.port}/graphql`,
|
||||
uri: `${webSocketScheme}://${platform.location.hostname}:${platformUrl.port}/graphql`,
|
||||
options: {
|
||||
reconnect: true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user