aspnet / Antiforgery

[Archived] AntiForgery token feature for ASP.NET Core. Project moved to https://github.com/aspnet/AspNetCore
Apache License 2.0
78 stars 40 forks source link

Updated the DefaultAntiforgery to set the the cache headers only if… #179

Closed mkArtakMSFT closed 6 years ago

mkArtakMSFT commented 6 years ago

… they aren't set yet.

This was resulting in an exception when a razor view was trying to render a form, when the headers have already been set.

mkArtakMSFT commented 6 years ago

I'm now updating the tests to cover this case!

mkArtakMSFT commented 6 years ago

Looks like the current design relies on "overriding" behavior. So I have to fix this, please don't review yet.

javiercn commented 6 years ago

Approach looks promising so far. Add some tests :)