From 74ba4e901a3613d5e628af1c30def7ca2edd60ba Mon Sep 17 00:00:00 2001 From: Polianin Nikita Date: Wed, 18 Dec 2024 07:29:05 +0300 Subject: [PATCH] fix: replace localhost to 127.0.0.1 --- Endpoint/Common/Services/UrlHelper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Endpoint/Common/Services/UrlHelper.cs b/Endpoint/Common/Services/UrlHelper.cs index 3de08b9..0c2a4f5 100644 --- a/Endpoint/Common/Services/UrlHelper.cs +++ b/Endpoint/Common/Services/UrlHelper.cs @@ -45,7 +45,7 @@ public static class UrlHelper public static string GetApiUrl(this HttpContext context, string apiPath = "") { var scheme = GetCurrentScheme(context); - var domain = GetCurrentDomain(context).TrimEnd('/'); + var domain = GetCurrentDomain(context).TrimEnd('/').Replace("localhost", "127.0.0.1"); var port = context.Request.Host.Port; var portString = port.HasValue && port != 80 && port != 443 ? $":{port}" : string.Empty;