Files
shgx_tz_mes_backend_sync/ZR.Admin.WebApi/appsettings.json
不做码农 973c3281b2 Squashed commit of the following:
commit 1daa137d98
Author: 不做码农 <599854767@qq.com>
Date:   Sat Apr 9 14:51:29 2022 +0800

    IPRatelimit添加白名单接口

commit d05690654b
Author: 不做码农 <599854767@qq.com>
Date:   Fri Apr 8 20:20:11 2022 +0800

    添加页签openPage支持传递参数

commit 861710079a
Author: 不做码农 <599854767@qq.com>
Date:   Fri Apr 8 12:44:28 2022 +0800

    update FileHelper.cs

commit a0cf47c099
Author: 不做码农 <599854767@qq.com>
Date:   Thu Apr 7 13:30:47 2022 +0800

    优化代码生成模板

commit 5b376614d0
Author: 不做码农 <599854767@qq.com>
Date:   Thu Apr 7 13:30:13 2022 +0800

    IP限制增加百名单接口

commit 939ec56d1d
Author: 不做码农 <599854767@qq.com>
Date:   Mon Apr 4 21:48:27 2022 +0800

    fix 基础sql脚本bug

commit 19c738b974
Author: 不做码农 <599854767@qq.com>
Date:   Mon Apr 4 18:53:02 2022 +0800

    新增加IPRateLimit限制

commit 6b0e6b11b3
Author: 不做码农 <599854767@qq.com>
Date:   Mon Apr 4 12:09:39 2022 +0800

    格式化代码

commit 1024471c64
Author: 不做码农 <599854767@qq.com>
Date:   Mon Apr 4 12:02:32 2022 +0800

    自定义异常新增获取LogAttribute属性
2022-04-09 15:06:45 +08:00

128 lines
4.1 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"ConnectionStrings": {
"conn_zrAdmin": "server=LAPTOP-STKF2M8H\\SQLEXPRESS;uid=sa;pwd=zradmin123;database=ZrAdmin;Trusted_Connection=SSPI",
"conn_bus": "server=LAPTOP-STKF2M8H\\SQLEXPRESS;uid=zr;pwd=zradmin123;database=ZrAdmin;Trusted_Connection=SSPI"
},
"conn_zrAdmin_type": 1, //MySql = 0, SqlServer = 1
"conn_bus_type": 1,
"urls": "http://localhost:8888", //项目启动url
"corsUrls": "http://localhost:8887", //跨域地址(前端启动项目,前后端分离单独部署需要设置),多个用","隔开
"JwtSettings": {
"Issuer": "ZRAdmin.NET",
"Audience": "ZRAdmin.NET",
"SecretKey": "SecretKey-ZRADMIN.NET-20210101",
"Expire": 30
},
"DemoMode": false, //是否演示模式
"DbKey": "", //数据库加密key
"Upload": {
"UploadUrl": "http://localhost:8888"
},
//阿里云存储配置
"ALIYUN_OSS": {
"REGIONID": "cn-hangzhou",
"KEY": "XX",
"SECRET": "XX",
"bucketName": "bucketName",
"domainUrl": "http://xxx.xxx.com" //访问资源域名
},
"gen": {
"conn": "server=LAPTOP-STKF2M8H\\SQLEXPRESS;user=zr;pwd=abc;database=ZrAdmin;Trusted_Connection=SSPI",
"dbType": 1, //MySql = 0, SqlServer = 1
"autoPre": true, //自动去除表前缀
"author": "zr",
"tablePrefix": "sys_" //"表前缀(生成类名不会包含表前缀,多个用逗号分隔)",
},
//邮箱配置信息
"MailOptions": {
//发送人邮箱
"From": "", //egxxxx@qq.com
//发送人邮箱密码
"Password": "123456",
//协议
"Smtp": "smtp.qq.com",
"Port": 587
},
//redis服务配置
"RedisServer": {
"Cache": "127.0.0.1:6379,defaultDatabase=0,poolsize=50,ssl=false,writeBuffer=10240,prefix=cache:",
"Session": "127.0.0.1:6379,defaultDatabase=0,poolsize=50,ssl=false,writeBuffer=10240,prefix=session:"
},
//接口请求限制
"IpRateLimiting": {
//例如设置了5次每分钟访问限流。当False时项目中每个接口都加入计数不管你访问哪个接口只要在一分钟内累计够5次将禁止访问。
//True当一分钟请求了5次GetData接口则该接口将在时间段内禁止访问但是还可以访问PostData()5次,总得来说是每个接口都有5次在这一分钟互不干扰。
"EnableEndpointRateLimiting": true,
//false拒绝的API调用不会添加到调用次数计数器上;如 客户端每秒发出3个请求并且您设置了每秒一个调用的限制则每分钟或每天计数器等其他限制将仅记录第一个调用即成功的API调用。如果您希望被拒绝的API调用计入其他时间的显示分钟小时等
//则必须设置StackBlockedRequests为true。
"StackBlockedRequests": false,
"RealIpHeader": "X-Real-IP",
//取白名单的客户端ID。如果此标头中存在客户端ID并且与ClientWhitelist中指定的值匹配则不应用速率限制。
"ClientIdHeader": "X-ClientId",
"HttpStatusCode": 429,
//端点白名单
"EndpointWhitelist": [ "post:/system/dict/data/types", "*:/msghub/negotiate", "*:/LogOut" ],
//客户端白名单
//"ClientWhitelist": [ "dev-id-1", "dev-id-2" ],
"QuotaExceededResponse": {
"Content": "{{\"code\":429,\"msg\":\"访问过于频繁,请稍后重试\"}}",
"ContentType": "application/json",
"StatusCode": 429
},
//通用规则api规则,结尾一定要带*
"GeneralRules": [
{
"Endpoint": "*:/captchaImage",
//时间段,格式:{数字}{单位}可使用单位s, m, h, d
"Period": "3s",
"Limit": 5
},
{
"Endpoint": "post:*",
//时间段,格式:{数字}{单位}可使用单位s, m, h, d
"Period": "3s",
"Limit": 1
},
{
"Endpoint": "put:*",
//时间段,格式:{数字}{单位}可使用单位s, m, h, d
"Period": "3s",
"Limit": 1
}
//{
// "Endpoint": "*",
// //时间段,格式:{数字}{单位}可使用单位s, m, h, d
// "Period": "1s",
// "Limit": 2
//}
//{
// "Endpoint": "*",
// "Period": "15m",
// "Limit": 100
//},
//{
// "Endpoint": "*",
// "Period": "12h",
// "Limit": 1000
//},
//{
// "Endpoint": "*",
// "Period": "7d",
// "Limit": 10000
//}
],
"IpRateLimitPolicies": {
//ip规则
"IpRules": [
]
}
}
}