Allow browser to access LND config (#5128)

This commit is contained in:
Nicolas Dorier 2023-06-30 15:08:23 +09:00 committed by GitHub
parent 627d84fc91
commit f3dbf1e139
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,6 +29,7 @@ using BTCPayServer.Storage.Services;
using BTCPayServer.Storage.Services.Providers;
using BTCPayServer.Validation;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
@ -664,6 +665,8 @@ namespace BTCPayServer.Controllers
[Route("lnd-config/{configKey}/lnd.config")]
[AllowAnonymous]
[EnableCors(CorsPolicies.All)]
[IgnoreAntiforgeryToken]
public IActionResult GetLNDConfig(ulong configKey)
{
var conf = _LnConfigProvider.GetConfig(configKey);