mirror of
https://github.com/gradio-app/gradio.git
synced 2024-11-27 01:40:20 +08:00
convert from http to ws
This commit is contained in:
parent
181f703017
commit
e41880598d
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user