I have two applications:
WebAPI in .NET Core 2.0
Frontend MVC in .NET Core 2.0 which uses javascript to send post requests.
In both start ups I have
ConfigureServices
services.AddCors();
services
 .AddMvc()
 .AddFluentValidation(fv => fv.RegisterValidatorsFromAssemblyContaining<Startup>());
Configure
app.UseDeveloperExceptionPage();
app.UseAuthentication();
app.UseCors(builder => builder
      .AllowAnyOrigin()
      .AllowAnyMethod()
      .AllowAnyHeader()
      .AllowCredentials()
      );
app.UseMvc();
But still in browser's console it shows
"Same Origin Policy" does not allow you to load remote resources from "http://10.1.5.6:12345/test/add". (missing CORS headline "Access-Control-Allow-Origin")
 
     
    