忽略hangfire token验证
This commit is contained in:
parent
96a38d8ec9
commit
a857e3f865
@ -40,11 +40,11 @@ public class CollectBusApplicationModule : AbpModule
|
||||
options.AddMaps<CollectBusApplicationModule>(validate: true);
|
||||
});
|
||||
|
||||
Configure<AbpAntiForgeryOptions>(options =>
|
||||
{
|
||||
options.TokenCookie.Expiration = TimeSpan.FromDays(365);
|
||||
options.AutoValidateIgnoredHttpMethods.Add("POST");
|
||||
});
|
||||
//Configure<AbpAntiForgeryOptions>(options =>
|
||||
//{
|
||||
// options.TokenCookie.Expiration = TimeSpan.FromDays(365);
|
||||
// options.AutoValidateIgnoredHttpMethods.Add("POST");
|
||||
//});
|
||||
}
|
||||
|
||||
public override void OnApplicationInitialization(
|
||||
|
||||
@ -81,6 +81,10 @@ namespace JiShe.CollectBus.Host
|
||||
app.UseAuditing();
|
||||
app.UseAbpSerilogEnrichers();
|
||||
app.UseUnitOfWork();
|
||||
app.UseHangfireDashboard("/hangfire", new DashboardOptions
|
||||
{
|
||||
IgnoreAntiforgeryToken = true
|
||||
});
|
||||
app.UseConfiguredEndpoints(endpoints =>
|
||||
{
|
||||
endpoints.MapHealthChecks("/health", new HealthCheckOptions
|
||||
@ -89,7 +93,6 @@ namespace JiShe.CollectBus.Host
|
||||
ResponseWriter = HealthCheckResponse.Writer
|
||||
});
|
||||
});
|
||||
app.UseHangfireDashboard();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user