Mention automatic CSRF protection in .NET 10 -> 11 migration article#37329
Open
DeagleGross wants to merge 2 commits into
Open
Mention automatic CSRF protection in .NET 10 -> 11 migration article#37329DeagleGross wants to merge 2 commits into
DeagleGross wants to merge 2 commits into
Conversation
Adds a short "Security" section pointing readers at <xref:security/csrf-protection> and <xref:migration/antiforgery-to-csrf>. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Splits the guidance into "already uses AddAntiforgery/UseAntiforgery" vs "doesn't configure antiforgery explicitly", then covers opt-out and CORS in a single follow-up paragraph. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a short mention of the new automatic CSRF protection in .NET 11 to the .NET 10 -> 11 migration article, so readers upgrading find the pointer during the usual migration walkthrough.
Follows the include pattern the article already uses for Blazor. Content:
WebApplication.CreateBuildernow wires up automatic CSRF protection middleware that inspectsSec-Fetch-Site/Originand records a verdict on the request.400unless the origin is trusted..DisableAntiforgery()on the endpoint.<xref:security/csrf-protection>and<xref:migration/antiforgery-to-csrf>for the full picture.Related feature PRs:
Opening as draft for review.
Internal previews