Merge branch 'master' into converter-optimizations

This commit is contained in:
Viktor Lofgren 2024-01-02 12:36:16 +01:00
commit 9d93a31755

View File

@ -23,6 +23,12 @@ public class EdgeDomain implements Serializable {
host = host.toLowerCase();
// Remove trailing dots, which are allowed in DNS but not in URLs
// (though sometimes still show up in the wild)
while (!host.isBlank() && host.endsWith(".")) {
host = host.substring(0, host.length() - 1);
}
var dot = host.lastIndexOf('.');
if (dot < 0 || looksLikeAnIp(host)) { // IPV6 >.>