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) {