From 8df1957503ce3715085e37268c48aaf45a96b5a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=98=89=E7=A5=A5=20=E8=A9=B9?= Date: Fri, 11 Jul 2025 15:16:01 +0800 Subject: [PATCH] updates --- Controllers/ApiController.cs | 13 +++++++++---- Models/GlobalClass.cs | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Controllers/ApiController.cs b/Controllers/ApiController.cs index 048a9cf..35ee9f6 100644 --- a/Controllers/ApiController.cs +++ b/Controllers/ApiController.cs @@ -153,10 +153,15 @@ namespace Bremen_ESG.Controllers string err_msg = ""; - if (GlobalClass.isURL(target_link) == false) - { - err_msg += "無有效結果連結\n"; - } + //if (GlobalClass.isURL(target_link) == false) + //{ + // err_msg += "無有效結果連結\n"; + //} + + //if (GlobalClass.isURL(target_link) == false) + //{ + // err_msg += "無有效結果連結\n"; + //} if (target_email != "") { diff --git a/Models/GlobalClass.cs b/Models/GlobalClass.cs index e8e7f40..822c296 100644 --- a/Models/GlobalClass.cs +++ b/Models/GlobalClass.cs @@ -24,7 +24,7 @@ using System.Collections.Specialized; public static class GlobalClass { public static IServiceProvider ServiceProvider; public static bool isURL(string url) { - return Uri.IsWellFormedUriString(url, UriKind.Absolute); + return Uri.IsWellFormedUriString(url, UriKind.RelativeOrAbsolute); } public static string GetIP(this HttpContext context) {