mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-03-03 09:29:10 +01:00
set CORS headers
This commit is contained in:
parent
098e07988c
commit
c84c0ac64d
1 changed files with 3 additions and 0 deletions
|
@ -41,6 +41,9 @@ namespace BTCPayServer.Hosting
|
|||
if (isBitpayAPI && httpContext.Request.Method == "OPTIONS")
|
||||
{
|
||||
httpContext.Response.StatusCode = 200;
|
||||
httpContext.Response.SetHeader("Access-Control-Allow-Origin", "*");
|
||||
httpContext.Response.SetHeader("Access-Control-Allow-Headers", "*");
|
||||
httpContext.Response.SetHeader("Access-Control-Allow-Methods", "*");
|
||||
return; // We bypass MVC completely
|
||||
}
|
||||
httpContext.SetIsBitpayAPI(isBitpayAPI);
|
||||
|
|
Loading…
Add table
Reference in a new issue