Add missing CORS to ln address of BTCPay (Compatibility Beach Wallet) (#4587)

This commit is contained in:
Nicolas Dorier 2023-02-02 09:40:31 +09:00 committed by GitHub
parent 8fc2729fab
commit ca1dac4cc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,6 +26,7 @@ using BTCPayServer.Services.Rates;
using BTCPayServer.Services.Stores;
using LNURL;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Routing;
using NBitcoin;
@ -320,6 +321,8 @@ namespace BTCPayServer
}
[HttpGet("~/.well-known/lnurlp/{username}")]
[EnableCors(CorsPolicies.All)]
[IgnoreAntiforgeryToken]
public async Task<IActionResult> ResolveLightningAddress(string username)
{
var lightningAddressSettings = await _lightningAddressService.ResolveByAddress(username);