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