mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-20 02:28:31 +01:00
set CORS headers
This commit is contained in:
parent
098e07988c
commit
c84c0ac64d
@ -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…
Reference in New Issue
Block a user