better tls zone calculation

This commit is contained in:
egarette@silique.fr 2023-07-31 19:11:01 +02:00
parent 2edf4d2e86
commit 55b0140edd

View file

@ -296,7 +296,7 @@ class Loader:
zones_name = server_datas['zones_name'] zones_name = server_datas['zones_name']
values = [f'{server_name}.{self.zones[zone_name]["domain_name"]}' for zone_name in zones_name] values = [f'{server_name}.{self.zones[zone_name]["domain_name"]}' for zone_name in zones_name]
if server_datas['applicationservice'] == 'tls': if server_datas['applicationservice'] == 'tls':
true_host_name = f'{server_name}.{self.zones[list(self.zones)[0]]["domain_name"]}' true_host_name = f'{server_name}.{self.zones[server_datas["zones_name"][0]]["domain_name"]}'
else: else:
true_host_name = values[0] true_host_name = values[0]
cfg['risotto_globals'][true_host_name] = {'global:host_name': host_name, cfg['risotto_globals'][true_host_name] = {'global:host_name': host_name,