Skip to content

Commit cd48bff

Browse files
author
r3dDoX
committed
handle tls protocol when in heroku instance
1 parent acc82bb commit cd48bff

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

client/js/communication/serverApi.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import * as messages from '../../../shared/messages/messages';
55
import {MessageType} from '../../../shared/messages/messageType';
66
import {SessionChoice} from '../../../shared/session/sessionChoice';
77

8-
const protocol = (window.location.hostname === 'localhost' || window.location.hostname.startsWith('192.168.99')) ? 'ws' : 'wss';
8+
const protocol = (process.env.NODE && ~process.env.NODE.indexOf('heroku')) ? 'wss' : 'ws';
99
const serverAddress = `${protocol}://${window.location.host}`;
1010

1111
let webSocket;

0 commit comments

Comments
 (0)