mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 14:34:23 +01:00
Fixing check for external services that don't specify server
This commit is contained in:
@@ -144,7 +144,7 @@ namespace BTCPayServer.Configuration
|
|||||||
}
|
}
|
||||||
public bool? IsOnion()
|
public bool? IsOnion()
|
||||||
{
|
{
|
||||||
if (!this.Server.IsAbsoluteUri)
|
if (this.Server == null || !this.Server.IsAbsoluteUri)
|
||||||
return null;
|
return null;
|
||||||
return this.Server.DnsSafeHost.EndsWith(".onion", StringComparison.OrdinalIgnoreCase);
|
return this.Server.DnsSafeHost.EndsWith(".onion", StringComparison.OrdinalIgnoreCase);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,9 +35,8 @@
|
|||||||
<td>@s.CryptoCode</td>
|
<td>@s.CryptoCode</td>
|
||||||
<td>
|
<td>
|
||||||
<span>@s.DisplayName</span>
|
<span>@s.DisplayName</span>
|
||||||
@if ((s.ConnectionString.IsOnion() is true) ||
|
@if (s.ConnectionString.IsOnion() == true ||
|
||||||
(s.ConnectionString.IsOnion() is false &&
|
(s.ConnectionString.IsOnion() == false && this.Context.Request.IsOnion()))
|
||||||
this.Context.Request.IsOnion()))
|
|
||||||
{
|
{
|
||||||
<span><img style="display:inline; margin-top:-8px;" src="~/img/icons/Onion_Color.svg" height="20" /></span>
|
<span><img style="display:inline; margin-top:-8px;" src="~/img/icons/Onion_Color.svg" height="20" /></span>
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user