LNURL: Add missing CORS

In addition to #4587. Closes #4615.
This commit is contained in:
Dennis Reimann
2023-02-09 17:45:09 +01:00
parent a20408bed1
commit 5d03e300fb

View File

@@ -81,7 +81,6 @@ namespace BTCPayServer
_btcPayNetworkJsonSerializerSettings = btcPayNetworkJsonSerializerSettings; _btcPayNetworkJsonSerializerSettings = btcPayNetworkJsonSerializerSettings;
} }
[HttpGet("withdraw/pp/{pullPaymentId}")] [HttpGet("withdraw/pp/{pullPaymentId}")]
public async Task<IActionResult> GetLNURLForPullPayment(string cryptoCode, string pullPaymentId, string pr, CancellationToken cancellationToken) public async Task<IActionResult> GetLNURLForPullPayment(string cryptoCode, string pullPaymentId, string pr, CancellationToken cancellationToken)
{ {
@@ -212,6 +211,7 @@ namespace BTCPayServer
return Ok(request); return Ok(request);
} }
[HttpGet("pay/app/{appId}/{itemCode}")] [HttpGet("pay/app/{appId}/{itemCode}")]
public async Task<IActionResult> GetLNURLForApp(string cryptoCode, string appId, string itemCode = null) public async Task<IActionResult> GetLNURLForApp(string cryptoCode, string appId, string itemCode = null)
{ {
@@ -470,6 +470,8 @@ namespace BTCPayServer
} }
[HttpGet("pay/i/{invoiceId}")] [HttpGet("pay/i/{invoiceId}")]
[EnableCors(CorsPolicies.All)]
[IgnoreAntiforgeryToken]
public async Task<IActionResult> GetLNURLForInvoice(string invoiceId, string cryptoCode, public async Task<IActionResult> GetLNURLForInvoice(string invoiceId, string cryptoCode,
[FromQuery] long? amount = null, string comment = null) [FromQuery] long? amount = null, string comment = null)
{ {