andrewlock / NetEscapades.AspNetCore.SecurityHeaders

Small package to allow adding security headers to ASP.NET Core websites
MIT License
701 stars 73 forks source link

Significant refactor of applying custom policies #185

Closed andrewlock closed 2 months ago

andrewlock commented 2 months ago

Revert some of the work from #172 and #173

That was too confusing (having two endpoints, two policy selectors). The updated version is much simpler as it has a single "override" function, and doesn't require two sets of middleware. It also allows applying the policy select just before we send the response, so we can do thinks like customise for content-type.

That latter point is important, as it allows simplifying some of the "document selector" stuff later...