mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 06:21:44 +01:00
Allow connection via non https lightning charge node through localhost or 127.0.0.1
This commit is contained in:
parent
3a0a5dbd7f
commit
936ae64ca3
1 changed files with 3 additions and 2 deletions
|
@ -54,10 +54,11 @@ namespace BTCPayServer.Controllers
|
|||
return View(vm);
|
||||
}
|
||||
|
||||
if (uri.Scheme != "https")
|
||||
var domain = GetDomain(uri.AbsoluteUri);
|
||||
if (uri.Scheme != "https" && domain != "127.0.0.1" && domain != "localhost")
|
||||
{
|
||||
var internalNode = GetInternalLightningNodeIfAuthorized();
|
||||
if (internalNode == null || GetDomain(internalNode) != GetDomain(uri.AbsoluteUri))
|
||||
if (internalNode == null || GetDomain(internalNode) != domain)
|
||||
{
|
||||
ModelState.AddModelError(nameof(vm.Url), "The url must be HTTPS");
|
||||
return View(vm);
|
||||
|
|
Loading…
Add table
Reference in a new issue