public void Configure(IApplicationBuilder app, IServiceProvider prov, IWebHostEnvironment env, ILoggerFactory loggerFactory, IServiceProvider serviceProvider, CookieRepository cookieRepository) { cookieRepository.Initialize(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } Logs.Configure(loggerFactory); #if !NETCOREAPP21 app.UseRouting(); #endif app.UseAuthentication(); #if !NETCOREAPP21 app.UseAuthorization(); #endif app.UseWebSockets(); // app.UseMiddleware<LogAllRequestsMiddleware>(); #if NETCOREAPP21 app.UseMvc(); #else app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); #endif }
public void Configure(IApplicationBuilder app, IServiceProvider prov, IWebHostEnvironment env, ILoggerFactory loggerFactory, IServiceProvider serviceProvider, CookieRepository cookieRepository) { cookieRepository.Initialize(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } Logs.Configure(loggerFactory); #if !NETCOREAPP21 app.UseRouting(); #endif app.UseAuthentication(); #if !NETCOREAPP21 app.UseAuthorization(); #endif app.UseWebSockets(); //app.UseMiddleware<LogAllRequestsMiddleware>(); #if NETCOREAPP21 app.UseMvc(); #else app.UseEndpoints(endpoints => { endpoints.MapHealthChecks("health", new Microsoft.AspNetCore.Diagnostics.HealthChecks.HealthCheckOptions() { ResponseWriter = HealthChecks.HealthCheckWriters.WriteJSON }); endpoints.MapControllers(); }); #endif }
public void Configure(IApplicationBuilder app, IServiceProvider prov, IHostingEnvironment env, ILoggerFactory loggerFactory, IServiceProvider serviceProvider, CookieRepository cookieRepository) { cookieRepository.Initialize(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } Logs.Configure(loggerFactory); app.UseAuthentication(); app.UseWebSockets(); app.UseMvc(); }
public void Configure(IApplicationBuilder app, IServiceProvider prov, ExplorerConfiguration explorerConfiguration, IWebHostEnvironment env, ILoggerFactory loggerFactory, IServiceProvider serviceProvider, CookieRepository cookieRepository) { cookieRepository.Initialize(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } Logs.Configure(loggerFactory); if (!string.IsNullOrEmpty(explorerConfiguration.InstanceName)) { app.Use(async(httpContext, next) => { httpContext.Response.Headers.Add("instance-name", explorerConfiguration.InstanceName); await next(); }); } #if !NETCOREAPP21 app.UseRouting(); #endif app.UseAuthentication(); #if !NETCOREAPP21 app.UseAuthorization(); #endif app.UseWebSockets(); //app.UseMiddleware<LogAllRequestsMiddleware>(); #if NETCOREAPP21 app.UseMvc(); #else app.UseEndpoints(endpoints => { endpoints.MapHealthChecks("health", new Microsoft.AspNetCore.Diagnostics.HealthChecks.HealthCheckOptions() { ResponseWriter = HealthChecks.HealthCheckWriters.WriteJSON }); endpoints.MapControllers(); }); #endif }
public ConfigureCookieFileBasedConfiguration(CookieRepository cookieRepo) { _CookieRepo = cookieRepo; }