Skip to content

Commit

Permalink
handle tls protocol when in heroku instance
Browse files Browse the repository at this point in the history
  • Loading branch information
r3dDoX committed May 9, 2017
1 parent acc82bb commit cd48bff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/js/communication/serverApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as messages from '../../../shared/messages/messages';
import {MessageType} from '../../../shared/messages/messageType';
import {SessionChoice} from '../../../shared/session/sessionChoice';

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

let webSocket;
Expand Down

0 comments on commit cd48bff

Please sign in to comment.