shgx_tz_mom/ZR.Admin.WebApi/appsettings.json

110 lines
3.7 KiB
JSON
Raw Normal View History

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": {
2023-04-07 10:58:24 +08:00
"conn_db": "Data Source=LAPTOP-STKF2M8H\\SQLEXPRESS;User ID=admin;Password=admin123;Initial Catalog=ZrAdmin;", //其他连接字符串请看官方文档
"conn_db_type": "1" //数据库类型 MySql = 0, SqlServer = 1, Oracle = 3PgSql = 4
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
},
2023-06-01 18:47:11 +08:00
"InjectClass": [ "ZR.Repository", "ZR.Service", "ZR.Tasks" ],//自动注入类
"InitDb": false, //是否初始化db
2022-06-01 17:25:41 +08:00
"DemoMode": false, //是否演示模式
2021-09-19 11:36:52 +08:00
"Upload": {
2022-07-12 21:12:52 +08:00
"uploadUrl": "http://localhost:8888", //本地存储资源访问路径
"localSavePath": "uploads", //本地上传默认文件存储目录 wwwroot/uploads
"maxSize": 15, //上传文件大小限制 15M
2022-10-11 21:45:15 +08:00
"notAllowedExt": [ ".bat", ".exe", ".jar", ".js" ]
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": {
2022-07-12 21:12:52 +08:00
"REGIONID": "", //egcn-hangzhou
2021-09-19 11:36:52 +08:00
"KEY": "XX",
2021-11-29 13:46:55 +08:00
"SECRET": "XX",
"bucketName": "bucketName",
2022-07-12 21:12:52 +08:00
"domainUrl": "http://xxx.xxx.com", //访问资源域名
"maxSize": 100 //上传文件大小限制 100M
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": {
2023-04-07 10:58:24 +08:00
"conn": "Data Source=LAPTOP-STKF2M8H\\SQLEXPRESS;User ID=admin;Password=admin123;Initial Catalog=ZrAdmin;",
"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": "", //前端代码存储路径egD:\Work\ZRAdmin-Vue3
"oracle_db": ""
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": "", //egxxxx@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": {
2023-03-08 13:02:38 +08:00
"open": 0, //是否启用redis
2022-01-01 16:05:06 +08:00
"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-07-12 21:12:52 +08:00
"EndpointWhitelist": [ "post:/system/dict/data/types", "*:/msghub/negotiate", "*:/LogOut", "*:/common/uploadfile" ],
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
},
{
2022-10-25 07:51:35 +08:00
"Endpoint": "((post)|(put)):*",
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": [
]
}
2022-10-11 21:45:15 +08:00
},
//验证码配置
"CaptchaOptions": {
2023-03-15 16:00:16 +08:00
"IgnoreCase": true // 比较时是否忽略大小写
2021-08-23 16:57:25 +08:00
}
}