mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-21 02:19:59 +08:00
handling reserved ip address to bind to all network interfaces #382
This commit is contained in:
parent
0abfe9c60d
commit
30f57eec26
@ -431,7 +431,8 @@ def start_server(interface, server_name, server_port, auth=None, ssl=None):
|
||||
port = get_first_available_port(
|
||||
server_port, server_port + TRY_NUM_PORTS
|
||||
)
|
||||
path_to_local_server = "http://{}:{}/".format(server_name, port)
|
||||
url_host_name = "localhost" if server_name == "0.0.0.0" else server_name
|
||||
path_to_local_server = "http://{}:{}/".format(url_host_name, port)
|
||||
if auth is not None:
|
||||
if not callable(auth):
|
||||
app.auth = {account[0]: account[1] for account in auth}
|
||||
|
Loading…
Reference in New Issue
Block a user