From ac4804e864b407cefd6ef6bf7f91d14a8da42079 Mon Sep 17 00:00:00 2001 From: Polianin Nikita Date: Fri, 5 Jul 2024 01:58:14 +0300 Subject: [PATCH] fix: get host name without port --- 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 428ebdd..b7c7a7a 100644 --- a/Endpoint/Common/Services/UrlHelper.cs +++ b/Endpoint/Common/Services/UrlHelper.cs @@ -7,7 +7,7 @@ namespace Mirea.Api.Endpoint.Common.Services; public static class UrlHelper { public static string CurrentDomain(HttpContext context) => - context.Request.Headers["X-Forwarded-Host"].FirstOrDefault() ?? context.Request.Host.Value; + context.Request.Headers["X-Forwarded-Host"].FirstOrDefault() ?? context.Request.Host.Host; private static string CreateSubPath(string? path) {