diff --git a/ClientTest/AppServiceTests.cs b/ClientTest/AppServiceTests.cs
new file mode 100644
index 0000000..a9f60cc
--- /dev/null
+++ b/ClientTest/AppServiceTests.cs
@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Xunit;
+
+namespace ClientTest;
+
+public class AppServiceTests
+{
+ [Fact]
+ public void Test1()
+ {
+ var str = "http://star.newlifex.com:80/";
+ var uri = new Uri(str);
+
+ var str2 = uri.ToString();
+ Assert.Equal("http://star.newlifex.com/", str2);
+ }
+
+ [Fact]
+ public void Test2()
+ {
+ var str = "https://star.newlifex.com:443/";
+ var uri = new Uri(str);
+
+ var str2 = uri.ToString();
+ Assert.Equal("https://star.newlifex.com/", str2);
+ }
+}
diff --git a/Stardust.Server/Services/RegistryService.cs b/Stardust.Server/Services/RegistryService.cs
index 4fe08ba..b055835 100644
--- a/Stardust.Server/Services/RegistryService.cs
+++ b/Stardust.Server/Services/RegistryService.cs
@@ -170,7 +170,9 @@ namespace Stardust.Server.Services
{
foreach (var elm in addrs)
{
- if (!ds.Contains(elm)) ds.Add(elm);
+ var url = elm;
+ if (url.StartsWithIgnoreCase("http://", "https://")) url = new Uri(url).ToString().TrimEnd('/');
+ if (!ds.Contains(url)) ds.Add(url);
}
}
}