// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { JwtStarter.InitJwtTokenAuth(services); services.AddControllers(); services.AddHttpContextAccessor(); SingletonStarter.RegisterSingleton(services); HealthCheckStarter.InstallHealthChecks(services); }
public static void SetApplicationSettings(IApplicationBuilder app) { app.UseHttpsRedirection(); app.UseRouting(); app.UseCors(x => x .AllowAnyOrigin() .AllowAnyMethod() .AllowAnyHeader()); app.UseAuthentication(); app.UseAuthorization(); HealthCheckStarter.InitializeHealthChecks(app); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); }