// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, IApplicationLifetime appLifetime) { loggerFactory.AddConsole(Configuration.GetSection("Logging")); loggerFactory.AddDebug(); loggerFactory.AddSerilog(); appLifetime.ApplicationStopped.Register(Log.CloseAndFlush); DalInitializer.InitializeDatabase(app, Configuration, env); var identityServerAddress = Configuration.GetValue <string>(EnvironmentVariablesNames.IdentityServerHostAddress); app.UseCors("default"); app.UseIdentityServerAuthentication(new IdentityServerAuthenticationOptions { Authority = identityServerAddress, RequireHttpsMetadata = false, AllowedScopes = new[] { TicketTraderScopes.ApiAdministrativeScope, TicketTraderScopes.ApiSaleScope, TicketTraderScopes.ApiInternalScope, TicketTraderClaims.TicketTraderStoreClaims }, ApiName = TicketTraderScopes.FullApiScope, }); app.UseMvc(); app.UseSwaggerUi(typeof(Startup).GetTypeInfo().Assembly, new SwaggerUiSettings()); }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, IApplicationLifetime appLifetime) { loggerFactory.ConfigureLogging(Configuration, appLifetime, "EventDefinitions.Gateway"); DalInitializer.InitializeDatabase(app, Configuration, env); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseMvc(); }