Add explicit antiforgery configuration and better error handling for UpdateStatus
This commit is contained in:
@@ -21,6 +21,13 @@ builder.Host.UseSerilog();
|
||||
builder.Services.AddControllers();
|
||||
builder.Services.AddControllersWithViews(); // Add MVC for Admin Panel
|
||||
|
||||
// Configure Antiforgery
|
||||
builder.Services.AddAntiforgery(options =>
|
||||
{
|
||||
options.HeaderName = "X-CSRF-TOKEN";
|
||||
options.FormFieldName = "__RequestVerificationToken";
|
||||
});
|
||||
|
||||
// Database
|
||||
if (builder.Environment.EnvironmentName == "Testing")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user