Use wss if origin uses https (#161)

This commit is contained in:
WithoutPants 2019-10-26 01:09:03 +11:00 committed by Leopere
parent 707bd09349
commit 70ce01c604

View file

@ -23,9 +23,12 @@ export class StashService {
if (process.env.REACT_APP_HTTPS === "true") {
platformUrl.protocol = "https:";
wsPlatformUrl.protocol = "wss:";
}
}
if (platformUrl.protocol === "https:") {
wsPlatformUrl.protocol = "wss:";
}
const url = platformUrl.toString().slice(0, -1) + "/graphql";
const wsUrl = wsPlatformUrl.toString().slice(0, -1) + "/graphql";