dataset/seed/reverse-proxy-client/funcs/revprox_client.py

15 lines
381 B
Python
Raw Normal View History

2022-03-20 21:15:45 +01:00
def calc_web_address(domain_name: str, port: str, local_location: str) -> str:
2022-03-08 19:42:28 +01:00
if not domain_name or not port:
return
2022-03-20 21:15:45 +01:00
web_address = f'https://{domain_name}'
if port != '443':
web_address += f':{port}'
2022-03-08 19:42:28 +01:00
if local_location:
web_address += local_location
return web_address
def get_first_value(lst: list):
if lst:
return lst[0]