File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -38,8 +38,12 @@ require([
3838
3939 var base_url = utils . get_body_data ( 'baseUrl' ) ;
4040 var ws_path = utils . get_body_data ( 'wsPath' ) ;
41- var ws_url = location . protocol . replace ( 'http' , 'ws' ) + "//" + location . host
42- + base_url + ws_path ;
41+ var ws_url = utils . get_body_data ( 'wsUrl' ) ;
42+ if ( ! ws_url ) {
43+ // trailing 's' in https will become wss for secure web sockets
44+ ws_url = location . protocol . replace ( 'http' , 'ws' ) + "//" + location . host ;
45+ }
46+ ws_url = ws_url + base_url + ws_path ;
4347
4448 var header = $ ( "#header" ) [ 0 ] ;
4549
Original file line number Diff line number Diff line change 77{% block params %}
88
99data-base-url="{{base_url | urlencode}}"
10+ data-ws-url="{{ws_url | urlencode}}"
1011data-ws-path="{{ws_path}}"
1112
1213{% endblock %}
You can’t perform that action at this time.
0 commit comments