mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 06:24:24 +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()
|
||||
{
|
||||
if (!this.Server.IsAbsoluteUri)
|
||||
if (this.Server == null || !this.Server.IsAbsoluteUri)
|
||||
return null;
|
||||
return this.Server.DnsSafeHost.EndsWith(".onion", StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
@@ -35,9 +35,8 @@
|
||||
<td>@s.CryptoCode</td>
|
||||
<td>
|
||||
<span>@s.DisplayName</span>
|
||||
@if ((s.ConnectionString.IsOnion() is true) ||
|
||||
(s.ConnectionString.IsOnion() is false &&
|
||||
this.Context.Request.IsOnion()))
|
||||
@if (s.ConnectionString.IsOnion() == true ||
|
||||
(s.ConnectionString.IsOnion() == false && this.Context.Request.IsOnion()))
|
||||
{
|
||||
<span><img style="display:inline; margin-top:-8px;" src="~/img/icons/Onion_Color.svg" height="20" /></span>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user