To enable CORS for Active Query Builder in a .NET Core project, add the following line as the first line to the Configure method of the Startup.cs file:
app.UseCors( b => b.AllowAnyHeader().AllowAnyMethod().AllowAnyOrigin() );
To enable CORS in a .NET Framework project, add the "Access-Control-Allow-Origin" header via the web.config file as follows:
<system.webServer>
...
<httpProtocol>
<customHeaders>
<clear />
<add name="Access-Control-Allow-Origin" value="*" />
</customHeaders>
</httpProtocol>
...
</system.webServer>
Comments
0 comments
Please sign in to leave a comment.