mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-22 16:34:26 +01:00
set CORS headers
This commit is contained in:
@@ -41,6 +41,9 @@ namespace BTCPayServer.Hosting
|
|||||||
if (isBitpayAPI && httpContext.Request.Method == "OPTIONS")
|
if (isBitpayAPI && httpContext.Request.Method == "OPTIONS")
|
||||||
{
|
{
|
||||||
httpContext.Response.StatusCode = 200;
|
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
|
return; // We bypass MVC completely
|
||||||
}
|
}
|
||||||
httpContext.SetIsBitpayAPI(isBitpayAPI);
|
httpContext.SetIsBitpayAPI(isBitpayAPI);
|
||||||
|
|||||||
Reference in New Issue
Block a user