From the course: ASP.NET Core: Health Checks and Logging
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Securing health check endpoints - ASP.NET Core Tutorial
From the course: ASP.NET Core: Health Checks and Logging
Securing health check endpoints
- [Instructor] I would like to finish with a brief glimpse at a few security-related features for health checks. The first one is the RequireHost method. This makes sure that the health check endpoints that have RequireHost, and we'll see that in a minute, are only available for specific hostnames. So for instance, in our case, we access the application so far via localhost port and then something. However, once deployed, the server name, the hostname is a different one and maybe on a production system, we would not like to have access to that health check endpoint, only locally, or vice versa. And therefore we can provide that hostname. Here's how that works. In Startup.cs where we set up our health check endpoints, how about this one? We just use the extension method, RequireHost and then we can just provide one string, with one host or several hosts and actually, since we have a list of hosts, which we are…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Health checks explained1m 20s
-
(Locked)
Configuring health checks2m 33s
-
(Locked)
Adding health checks4m 31s
-
(Locked)
Adding database health checks7m 12s
-
(Locked)
Creating a UI8m 10s
-
(Locked)
Securing health check endpoints6m 42s
-
(Locked)
Challenge: Add a health check to the sample app1m 5s
-
(Locked)
Solution: Add a health check to the sample app7m 39s
-
(Locked)
Summary of health checks1m 28s
-
(Locked)