refactor: use this in static method

This commit is contained in:
2024-08-10 23:11:43 +03:00
parent c51a9cecc9
commit b1250616a7
3 changed files with 7 additions and 3 deletions

View File

@ -6,7 +6,7 @@ namespace Mirea.Api.Endpoint.Common.Services;
public static class UrlHelper
{
public static string CurrentDomain(HttpContext context) =>
public static string GetCurrentDomain(this HttpContext context) =>
context.Request.Headers["X-Forwarded-Host"].FirstOrDefault() ?? context.Request.Host.Host;
private static string CreateSubPath(string? path)