mirror of
https://github.com/clearml/clearml
synced 2025-03-03 18:52:12 +00:00
Support clearml-init hosts detection for WebApp with no port (#1031)
Support clearml-init hosts detection for WebApp with no port and api/files hosts use the default ports.
This commit is contained in:
parent
66061af1aa
commit
1ccdff5e77
@ -237,6 +237,12 @@ def parse_known_host(parsed_host):
|
||||
api_host = parsed_host.scheme + "://" + parsed_host.netloc.replace(':8080', ':8008', 1) + parsed_host.path
|
||||
web_host = parsed_host.scheme + "://" + parsed_host.netloc + parsed_host.path
|
||||
files_host = parsed_host.scheme + "://" + parsed_host.netloc.replace(':8080', ':8081', 1) + parsed_host.path
|
||||
elif parsed_host.port is None:
|
||||
print('Web app hosted on standard port using ' + parsed_host.scheme + ' protocol.')
|
||||
print('Assuming files and api ports are unchanged and use the same (' + parsed_host.scheme + ') protocol')
|
||||
api_host = parsed_host.scheme + "://" + parsed_host.netloc + ':8008' + parsed_host.path
|
||||
web_host = parsed_host.scheme + "://" + parsed_host.netloc + parsed_host.path
|
||||
files_host = parsed_host.scheme + "://" + parsed_host.netloc+ ':8081' + parsed_host.path
|
||||
else:
|
||||
print("Warning! Could not parse host name")
|
||||
api_host = ''
|
||||
|
Loading…
Reference in New Issue
Block a user