Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

use wss: protocol for secure websocket when page is using https: #1358

Merged
merged 1 commit into from
Aug 24, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion bin/ion-dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ window.IonicDevServer = {

openConnection: function() {
var self = this;
this.socket = new WebSocket('ws://' + window.location.hostname + ':' + IonicDevServerConfig.wsPort);
var socketProtocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
this.socket = new WebSocket(socketProtocol + '//' + window.location.hostname + ':' + IonicDevServerConfig.wsPort);

this.socket.onopen = function(ev) {
self.socketReady = true;
Expand Down