2021-08-23 16:57:25 +08:00
|
|
|
|
{
|
|
|
|
|
|
"Logging": {
|
|
|
|
|
|
"LogLevel": {
|
|
|
|
|
|
"Default": "Information",
|
|
|
|
|
|
"Microsoft": "Warning",
|
|
|
|
|
|
"Microsoft.Hosting.Lifetime": "Information"
|
|
|
|
|
|
}
|
2021-09-19 11:36:52 +08:00
|
|
|
|
},
|
|
|
|
|
|
"ConnectionStrings": {
|
2022-06-01 17:25:41 +08:00
|
|
|
|
"conn_db": "Data Source=LAPTOP-STKF2M8H\\SQLEXPRESS;User ID=sa;Password=zradmin123;Initial Catalog=ZrAdmin;Integrated Security=SSPI", //其他连接字符串请看官方文档
|
|
|
|
|
|
"conn_db_type": "1" //数据库类型 MySql = 0, SqlServer = 1
|
2021-09-19 11:36:52 +08:00
|
|
|
|
},
|
2022-06-01 17:25:41 +08:00
|
|
|
|
"urls": "http://localhost:8888", //项目启动url,如果改动端口前端对应devServer也需要进行修改
|
|
|
|
|
|
"corsUrls": "http://localhost:8887", //跨域地址(前端启动项目,前后端分离单独部署需要设置),多个用","隔开
|
2021-12-03 17:42:44 +08:00
|
|
|
|
"JwtSettings": {
|
2021-12-08 13:31:31 +08:00
|
|
|
|
"Issuer": "ZRAdmin.NET",
|
|
|
|
|
|
"Audience": "ZRAdmin.NET",
|
|
|
|
|
|
"SecretKey": "SecretKey-ZRADMIN.NET-20210101",
|
2022-06-01 17:25:41 +08:00
|
|
|
|
"Expire": 1440 //jwt登录过期时间(分)
|
2021-12-03 17:42:44 +08:00
|
|
|
|
},
|
2022-07-01 22:39:39 +08:00
|
|
|
|
"InitDb": false,//是否初始化db
|
2022-06-01 17:25:41 +08:00
|
|
|
|
"DemoMode": false, //是否演示模式
|
2021-09-19 11:36:52 +08:00
|
|
|
|
"Upload": {
|
2022-06-09 08:37:31 +08:00
|
|
|
|
"UploadUrl": "http://localhost:8888", //本地存储资源访问路径
|
|
|
|
|
|
"localSavePath": "uploads" //本地上传默认文件存储目录 wwwroot/uploads
|
2021-09-19 11:36:52 +08:00
|
|
|
|
},
|
2022-06-01 17:25:41 +08:00
|
|
|
|
//阿里云存储配置
|
2021-11-29 13:46:55 +08:00
|
|
|
|
"ALIYUN_OSS": {
|
2021-09-19 11:36:52 +08:00
|
|
|
|
"REGIONID": "cn-hangzhou",
|
|
|
|
|
|
"KEY": "XX",
|
2021-11-29 13:46:55 +08:00
|
|
|
|
"SECRET": "XX",
|
|
|
|
|
|
"bucketName": "bucketName",
|
2022-06-01 17:25:41 +08:00
|
|
|
|
"domainUrl": "http://xxx.xxx.com" //访问资源域名
|
2021-09-19 11:36:52 +08:00
|
|
|
|
},
|
2022-07-09 19:02:36 +08:00
|
|
|
|
//企业微信通知配置
|
|
|
|
|
|
"WxCorp": {
|
|
|
|
|
|
"AgentID": "",
|
|
|
|
|
|
"CorpID": "",
|
|
|
|
|
|
"CorpSecret": "",
|
|
|
|
|
|
"SendUser": "@all"
|
|
|
|
|
|
},
|
2021-09-19 11:36:52 +08:00
|
|
|
|
"gen": {
|
2022-05-31 11:45:20 +08:00
|
|
|
|
"conn": "Data Source=LAPTOP-STKF2M8H\\SQLEXPRESS;User ID=sa;Password=zradmin123;Initial Catalog=ZrAdmin;Integrated Security=SSPI",
|
2021-11-18 10:16:45 +08:00
|
|
|
|
"dbType": 1, //MySql = 0, SqlServer = 1
|
2022-06-01 17:25:41 +08:00
|
|
|
|
"autoPre": true, //自动去除表前缀
|
2022-05-26 13:32:55 +08:00
|
|
|
|
"author": "admin",
|
2022-06-01 17:25:41 +08:00
|
|
|
|
"tablePrefix": "sys_", //"表前缀(生成类名不会包含表前缀,多个用逗号分隔)",
|
|
|
|
|
|
"vuePath": "" //前端代码存储路径eg:D:\Work\ZRAdmin-Vue3
|
2021-09-28 17:42:25 +08:00
|
|
|
|
},
|
2022-06-01 17:25:41 +08:00
|
|
|
|
//邮箱配置信息
|
2021-09-28 17:42:25 +08:00
|
|
|
|
"MailOptions": {
|
2022-06-01 17:25:41 +08:00
|
|
|
|
//发送人邮箱
|
|
|
|
|
|
"From": "", //eg:xxxx@qq.com
|
|
|
|
|
|
//发送人邮箱密码
|
2021-09-28 17:42:25 +08:00
|
|
|
|
"Password": "123456",
|
2022-06-01 17:25:41 +08:00
|
|
|
|
//协议
|
2021-09-28 17:42:25 +08:00
|
|
|
|
"Smtp": "smtp.qq.com",
|
2022-07-01 20:01:40 +08:00
|
|
|
|
"Port": 587,
|
|
|
|
|
|
"Signature": "系统邮件,请勿回复!"
|
2022-01-01 16:05:06 +08:00
|
|
|
|
},
|
2022-06-01 17:25:41 +08:00
|
|
|
|
//redis服务配置
|
2022-01-01 16:05:06 +08:00
|
|
|
|
"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:"
|
2022-04-04 18:53:02 +08:00
|
|
|
|
},
|
2022-06-01 17:25:41 +08:00
|
|
|
|
//接口请求限制
|
2022-04-04 18:53:02 +08:00
|
|
|
|
"IpRateLimiting": {
|
|
|
|
|
|
"EnableEndpointRateLimiting": true,
|
|
|
|
|
|
"StackBlockedRequests": false,
|
|
|
|
|
|
"RealIpHeader": "X-Real-IP",
|
|
|
|
|
|
"ClientIdHeader": "X-ClientId",
|
|
|
|
|
|
"HttpStatusCode": 429,
|
2022-04-09 14:51:29 +08:00
|
|
|
|
"EndpointWhitelist": [ "post:/system/dict/data/types", "*:/msghub/negotiate", "*:/LogOut" ],
|
2022-04-04 18:53:02 +08:00
|
|
|
|
"QuotaExceededResponse": {
|
2022-06-01 17:25:41 +08:00
|
|
|
|
"Content": "{{\"code\":429,\"msg\":\"访问过于频繁,请稍后重试\"}}",
|
2022-04-04 18:53:02 +08:00
|
|
|
|
"ContentType": "application/json",
|
|
|
|
|
|
"StatusCode": 429
|
|
|
|
|
|
},
|
2022-06-01 17:25:41 +08:00
|
|
|
|
//通用规则,api规则,结尾一定要带*
|
2022-04-04 18:53:02 +08:00
|
|
|
|
"GeneralRules": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"Endpoint": "*:/captchaImage",
|
2022-06-01 17:25:41 +08:00
|
|
|
|
//时间段,格式:{数字}{单位};可使用单位:s, m, h, d
|
2022-04-04 18:53:02 +08:00
|
|
|
|
"Period": "3s",
|
|
|
|
|
|
"Limit": 5
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"Endpoint": "post:*",
|
2022-06-01 17:25:41 +08:00
|
|
|
|
//时间段,格式:{数字}{单位};可使用单位:s, m, h, d
|
2022-04-04 18:53:02 +08:00
|
|
|
|
"Period": "3s",
|
|
|
|
|
|
"Limit": 1
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"Endpoint": "put:*",
|
2022-06-01 17:25:41 +08:00
|
|
|
|
//时间段,格式:{数字}{单位};可使用单位:s, m, h, d
|
2022-04-04 18:53:02 +08:00
|
|
|
|
"Period": "3s",
|
|
|
|
|
|
"Limit": 1
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"IpRateLimitPolicies": {
|
2022-06-01 17:25:41 +08:00
|
|
|
|
//ip规则
|
2022-04-04 18:53:02 +08:00
|
|
|
|
"IpRules": [
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
2021-08-23 16:57:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|