mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 18:11:36 +01:00
Fix Display app on website root feature
This commit is contained in:
parent
a20906bc12
commit
77d1580ee3
@ -30,9 +30,9 @@ namespace BTCPayServer.Filters
|
||||
return true;
|
||||
var settingsRepository = context.RouteContext.HttpContext.RequestServices.GetService<ISettingsRepository>();
|
||||
var policies = settingsRepository.GetPolicies().GetAwaiter().GetResult();
|
||||
if (policies?.DomainToAppMapping is { } mapping && mapping.Any())
|
||||
if (policies?.DomainToAppMapping is { } mapping)
|
||||
{
|
||||
var matchedDomainMapping = policies.DomainToAppMapping.FirstOrDefault(item =>
|
||||
var matchedDomainMapping = mapping.FirstOrDefault(item =>
|
||||
item.Domain.Equals(context.RouteContext.HttpContext.Request.Host.Host, StringComparison.InvariantCultureIgnoreCase));
|
||||
if (matchedDomainMapping != null)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user