Skip to content

Commit 0c5e846

Browse files
authored
Fix AntiforgeryValidationException in the Hangfire Dashboard (#3599)
1 parent 158d621 commit 0c5e846

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/SIL.XForge.Scripture/Startup.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,11 @@ IExceptionHandler exceptionHandler
292292
endpoints.MapHub<NotificationHub>(pattern: $"/{UrlConstants.ProjectNotifications}");
293293
var authOptions = Configuration.GetOptions<AuthOptions>();
294294
endpoints.MapHangfireDashboard(
295-
new DashboardOptions { Authorization = [new HangfireDashboardAuthorizationFilter(authOptions)] }
295+
new DashboardOptions
296+
{
297+
Authorization = [new HangfireDashboardAuthorizationFilter(authOptions)],
298+
IgnoreAntiforgeryToken = true,
299+
}
296300
);
297301
});
298302

0 commit comments

Comments
 (0)