fix: get host name without port

This commit is contained in:
Polianin Nikita 2024-07-05 01:58:14 +03:00
parent 21055176ac
commit ac4804e864

View File

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