Replies: 1 comment
-
Hello @gimpesi , app.UseExceptionHandler(appError =>
{
appError.Run(context =>
{
var ex = context.Features.Get<IExceptionHandlerPathFeature>()?.Error;
if (ex is AntiforgeryValidationException)
{
context.Response.Redirect("/Error/InvalidAntiforgeryToken");
return Task.CompletedTask;
}
return Task.CompletedTask;
});
}); Or, for specific actions, decorate them with |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
is there a way to handle invalid forgery token error?
Like a redirect or something else?
Beta Was this translation helpful? Give feedback.
All reactions