diff util/prosodyctl/check.lua @ 11654:52c7a0e74bb2

util.prosodyctl.check: Normalize potential to form without trailing '.' In some cases you might end up with both 'xmpp.example.com' and 'xmpp.example.com.', which are the same thing so no point in doing the same checks twice.
author Kim Alvefur <zash@zash.se>
date Sun, 04 Jul 2021 01:33:53 +0200
parents 51141309ffc4
children bbf50525faa5
line wrap: on
line diff
--- a/util/prosodyctl/check.lua	Sun Jul 04 01:32:04 2021 +0200
+++ b/util/prosodyctl/check.lua	Sun Jul 04 01:33:53 2021 +0200
@@ -446,6 +446,8 @@
 				target_hosts:add(host);
 			end
 
+			target_hosts = target_hosts / function(target) return target:gsub("%.$", ""); end
+
 			if target_hosts:contains("localhost") then
 				print("    Target 'localhost' cannot be accessed from other servers");
 				target_hosts:remove("localhost");