Attention: We are retiring the ASP.NET Community Blogs. Learn more >

Highlight Keywords From Response Using ASP.NET Core Middleware

Recently I needed to search for certain keywords from the response body and then highlight them with different color. In ASP.NET Web Forms you would have created an HTTP module to achieve this. In ASP.NET MVC you would have written a custom filter to accomplish this task. In ASP.NET Core you can write a custom middleware to do the same. The remainder of this article shows how.

http://www.binaryintellect.net/articles/439edbad-fd51-4eaf-953a-5484941c7e8c.aspx