I solved this problem after not finding the solution on Stackoverflow, so I am sharing my problem here and the solution in an answer.
After enabling a cross domain p
I know it has been answered. Just answering with the updated information. So it would help others.
It is now built into the ASP.NET Core framework.
Just follow https://docs.microsoft.com/en-us/aspnet/core/security/cors
and replace
app.UseCors(builder =>
builder.WithOrigins("http://example.com"));
with
app.UseCors(builder =>
builder.WithOrigins("http://example.com")
.AllowAnyHeader()
.AllowAnyMethod()
.AllowCredentials());