From 822abc9136d26f30d2d6b236698a59af2c465a80 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Fri, 19 Aug 2022 15:56:44 +0200 Subject: [PATCH] Put ipv6 resolver address in square brackets --- core/nginx/config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/nginx/config.py b/core/nginx/config.py index 77cb3dcd..6afde510 100755 --- a/core/nginx/config.py +++ b/core/nginx/config.py @@ -12,7 +12,8 @@ log.basicConfig(stream=sys.stderr, level=args.get("LOG_LEVEL", "WARNING")) # Get the first DNS server with open("/etc/resolv.conf") as handle: content = handle.read().split() - args["RESOLVER"] = content[content.index("nameserver") + 1] + resolver = content[content.index("nameserver") + 1] + args["RESOLVER"] = f"[{resolver}]" if ":" in resolver else resolver args["ADMIN_ADDRESS"] = system.get_host_address_from_environment("ADMIN", "admin") args["ANTISPAM_WEBUI_ADDRESS"] = system.get_host_address_from_environment("ANTISPAM_WEBUI", "antispam:11334")