mirror of
https://github.com/Team254/cheesy-arena-lite.git
synced 2026-03-09 21:56:50 -04:00
Use WSS if HTTPS is being used.
This commit is contained in:
@@ -5,8 +5,11 @@
|
||||
|
||||
var CheesyWebsocket = function(path, events) {
|
||||
var that = this;
|
||||
|
||||
var url = "ws://" + window.location.hostname;
|
||||
var protocol = "ws://";
|
||||
if (window.location.protocol == "https:") {
|
||||
protocol = "wss://";
|
||||
}
|
||||
var url = protocol + window.location.hostname;
|
||||
if (window.location.port != "") {
|
||||
url += ":" + window.location.port;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user