I am getting a problem with possibly Cors. I am doing local dev(react frontend, asp.net core 2 api backend).
Both IE 11 and Chrome have no problem, but Firefox has a problem with my requests.
I just keep getting "Network Error" from my calls.
I disabled "HSTS" in firefox and now I am seeing a "warning message"
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://localhost:44391/api/tokens/auth. (Reason: CORS request did not succeed).
In my cor right now to make dev simple I just have
public void ConfigureServices(IServiceCollection services)
{
services.AddCors();
...
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
app.UseCors(builder => builder
.AllowAnyOrigin()
.AllowAnyMethod()
.AllowAnyHeader()
.AllowCredentials());
}