// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IServiceProvider serviceProvider) { DefaultData.FillData(serviceProvider); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseCors(config => config.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader()); app.UseSwagger(); app.UseSwaggerUI(setup => setup.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1")); app.UseAuthentication(); app.UseRouting(); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); }