public Action <IApplicationBuilder> Configure(Action <IApplicationBuilder> next)
 {
     return(app =>
     {
         next(app);
         app.UseEndpoints(endpoints =>
         {
             endpoints.MapAllActuators(MediaTypeVersion);
         });
         HealthStartupFilter.InitializeAvailability(app.ApplicationServices);
     });
 }
Exemple #2
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
        {
            app.UseStaticFiles();

            app.UseRouting();
            app.UseEndpoints(endpoints => {
                endpoints.MapDefaultControllerRoute();
                endpoints.Map <HealthEndpoint>();
            });

            SampleData.InitializeFortunesAsync(app.ApplicationServices).Wait();
            HealthStartupFilter.InitializeAvailability(app.ApplicationServices);
        }
        public Action <IApplicationBuilder> Configure(Action <IApplicationBuilder> next)
        {
            return(app =>
            {
                next(app);

                app.UseEndpoints(endpoints =>
                {
                    var builder = endpoints.MapAllActuators();
                    _configureConventions?.Invoke(builder);
                });

                HealthStartupFilter.InitializeAvailability(app.ApplicationServices);
            });
        }
Exemple #4
0
        public Action <IApplicationBuilder> Configure(Action <IApplicationBuilder> next)
        {
            return(app =>
            {
                app.UseCors("SteeltoeManagement");
                app.UseCloudFoundrySecurity();
                next(app);
                app.UseEndpoints(endpoints =>
                {
                    endpoints.Map <CloudFoundryEndpoint>();
                    endpoints.MapAllActuators(MediaTypeVersion);
                });

                HealthStartupFilter.InitializeAvailability(app.ApplicationServices);
            });
        }
Exemple #5
0
        // 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();
            }
            else
            {
                app.UseExceptionHandler("/Home/Error");
            }

            app.UseStaticFiles();
            app.UseRouting();
            app.UseEndpoints(endpoints => {
                endpoints.MapDefaultControllerRoute();
                endpoints.Map<HealthEndpoint>();
            });

            HealthStartupFilter.InitializeAvailability(app.ApplicationServices);
        }