1, all of the terminals can be called, as follows:
public void Configure(IApplicationBuilder app, IHostingEnvironment env) { // Preceding code ommitted. app.UseRouting(); app.UseCors(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); // Following code ommited. }
By the end point routing, CORS middleware must be configured to be performed between calls to UseRouting and UseEndpoints of. Middleware is not configured correctly will lead to stop functioning properly.