Skip to content

Instantly share code, notes, and snippets.

@lgolubyev
Created May 24, 2022 16:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lgolubyev/389484b8da14c55ce21a521471e36eec to your computer and use it in GitHub Desktop.
Save lgolubyev/389484b8da14c55ce21a521471e36eec to your computer and use it in GitHub Desktop.
builder.Services.AddAntiforgery(options =>
{
// Set Cookie properties using CookieBuilder properties.
options.FormFieldName = "AntiforgeryFieldname";
options.HeaderName = "X-CSRF-TOKEN-HEADERNAME";
options.SuppressXFrameOptionsHeader = false;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment