make sure we have cors for all of greenfield (#4760)

fixes #4758
This commit is contained in:
Andrew Camilleri
2023-03-10 15:20:11 +01:00
committed by GitHub
parent 06951a39c6
commit 7951dcada6
13 changed files with 27 additions and 7 deletions

View File

@@ -6,6 +6,7 @@ using BTCPayServer.Data;
using BTCPayServer.Security;
using BTCPayServer.Services.Stores;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
@@ -17,6 +18,7 @@ namespace BTCPayServer.Controllers.Greenfield
[Route("api/test/apikey")]
[ApiController]
[Authorize(AuthenticationSchemes = AuthenticationSchemes.Greenfield)]
[EnableCors(CorsPolicies.All)]
public class GreenfieldTestApiKeyController : ControllerBase
{
private readonly UserManager<ApplicationUser> _userManager;