You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
1 year ago | |
|---|---|---|
| .. | ||
| LINGYUN/Abp/Idempotent | 2 years ago | |
| System | 2 years ago | |
| FodyWeavers.xml | 2 years ago | |
| FodyWeavers.xsd | 2 years ago | |
| LINGYUN.Abp.Idempotent.csproj | 1 year ago | |
| README.md | 2 years ago | |
README.md
LINGYUN.Abp.Idempotent
接口幂等性检查模块
配置使用
[DependsOn(typeof(AbpIdempotentModule))]
public class YouProjectModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpIdempotentOptions>(options =>
{
// 全局启用幂等检查
options.IsEnabled = true;
// 默认每个接口提供5秒超时
options.DefaultTimeout = 5000;
// 幂等token名称, 通过HttpHeader传递
options.IdempotentTokenName = "X-With-Idempotent-Token";
// 幂等校验失败时Http响应代码
options.HttpStatusCode = 429;
});
}
}