convert from http to ws

This commit is contained in:
Abubakar Abid 2019-03-07 15:16:59 -08:00
parent 181f703017
commit e41880598d

View File

@ -101,6 +101,7 @@ def render_template_with_tags(template_path, context):
#TODO(abidlabs): Handle the http vs. https issue that sometimes happens (a ws cannot be loaded from an https page)
def set_ngrok_url_in_js(temp_dir, ngrok_socket_url):
ngrok_socket_url = ngrok_socket_url.replace('http', 'ws')
js_file = os.path.join(temp_dir, BASE_JS_FILE)
render_template_with_tags(js_file, {'ngrok_socket_url': ngrok_socket_url})
config_file = os.path.join(temp_dir, CONFIG_FILE)