Walter.BOM Namespace
Walter.Web.FireWall Namespace
ASP-WAF Web application firewall for .Net 6, .Net 5, .Net Standard 2.1 and .Net Core 3.x

MinifyAttribute Class

Will minify the Razor output if the request is a HTTPGet and does not contain an error.

Namespace:  Walter.Web.FireWall.Annotations
Assembly:  Walter.Web.FireWall (in Walter.Web.FireWall.dll)

Syntax


public sealed class MinifyAttribute

Remarks


Do not use minification on anything but RazorViews as it will likely corrupt all other media types.

Examples


Minify the rendered Razor view. You can access the compressed in the post processing as well as in the page reporting.
C#
[Minify]
   public async Task<IActionResult> Index()
   {
     var model= await Factory.NavigationModel().ConfigureAwait(false);
     return View(model);
   }