Middleware

Passing Configuration Options Into Middleware, Services and Controllers in ASP.NET Core 3.1

Full source code here. I recently hit a problem where I needed to reload configuration settings as they changed, fortunately this is relatively straightforward when using the IOptionsMonitor, in .NET Core.

Alter response header in Web API to return machine name

Full source code available here. I recently hit a problem where I was getting incorrect responses from a server behind a load balancer. Looking at the logs didn’t help because there was no error.