Init Git
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace AMREZ.EOP.Domain.Shared.Tenancy;
|
||||
|
||||
public static class HttpContextTenantExtensions
|
||||
{
|
||||
public static string? GetTargetTenantKey(this HttpContext http)
|
||||
{
|
||||
return http.Items.TryGetValue("TargetTenantKey", out var v)
|
||||
? v as string
|
||||
: http.Request.Headers["X-Tenant"].ToString()?.Trim().ToLowerInvariant();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user