mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 14:34:23 +01:00
Allow connection via non https lightning charge node through localhost or 127.0.0.1
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user