use wss instead of ws when not on localhost
This commit is contained in:
parent
0fcd970445
commit
b0d466ac08
1 changed files with 2 additions and 1 deletions
|
|
@ -11,7 +11,8 @@ let ws =
|
||||||
~some:(fun port -> Format.sprintf ":%d" port)
|
~some:(fun port -> Format.sprintf ":%d" port)
|
||||||
(Uri.port location)
|
(Uri.port location)
|
||||||
in
|
in
|
||||||
Jstr.of_string @@ Format.sprintf "ws://%s%s/island/ws" host port
|
let ws = if host = "localhost" then "ws" else "wss" in
|
||||||
|
Jstr.of_string @@ Format.sprintf "%s://%s%s/island/ws" ws host port
|
||||||
in
|
in
|
||||||
Websocket.create ws_url
|
Websocket.create ws_url
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue