// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseRouting(); app.UseAuthentication(); app.UseAuthorization(); //configuração de CORS CorsConfiguration.UseCors(app); //configuração do JWT JwtConfiguration.UseJwt(app); //configuração do swagger SwaggerConfiguration.UseSwagger(app); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseRouting(); //Setup para configuração do CORS CorsConfiguration.UseCors(app); JwtConfiguration.Configure(app); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); //Setup para configuração do Swagger SwaggerConfiguration.UseSwagger(app); }