Fixes for running with https frontend (#20)

* use browser protocol

* Update zz_generated.static.go

* set host args with proper port

* Update zz_generated.static.go

* use proper protocol for the websocket
This commit is contained in:
Chris Campbell
2020-11-22 09:34:26 -07:00
committed by GitHub
parent 83d0260c6f
commit b64c44e6ac
3 changed files with 15 additions and 15 deletions

View File

@ -135,7 +135,7 @@
localStorage.setItem("playerName", inputPlayerName.value);
}
host = document.location.host
if (!host.includes(":")) { host = host + ":80" }
if (!host.includes(":")) { host = host + (window.location.protocol == 'https:' ? ":443" : ":80") }
var args = ['+set', 'fs_cdn', host, '+connect', host];
args.push.apply(args, ['+set', 'cl_allowDownload', '1'])
args.push.apply(args, ['+set', 'cl_timeout', '15'])