You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

270 lines
7.8 KiB
JSON

{
"urls": "http://*:6001", //web服务端口如果用IIS部署把这个去掉
"AllowedHosts": "*",
"Startup": {
"Domain": "http://localhost:6001",
"Cors": {
"PolicyName": "CorsIpAccess", //策略名称
"EnableAllIPs": true, //当为true时开放所有IP均可访问。
// 支持多个域名端口,注意端口号后不要带/斜杆比如localhost:8000/是错的另外http://127.0.0.1:1818 和 http://localhost:1818 是不一样的
"IPs": "http://127.0.0.1:2364,http://localhost:2364,http://127.0.0.1:6688,http://localhost:6688"
},
"AppConfigAlert": {
"Enabled": true
},
"ApiName": "EntrustSettle",
"IdentityServer4": {
"Enabled": true, // 这里默认是false表示使用jwt授权模式如果设置为true则表示系统使用Ids4模式
"AuthorizationUrl": "http://60.209.125.238:40501", // 认证中心域名
9 months ago
"ApiName": "(未验证Audience)" // 资源服务器
},
"RedisMq": {
"Enabled": false //redis 消息队列
9 months ago
},
9 months ago
9 months ago
"UserInfoCacheTime": 60 //用户信息缓存时间,单位:分钟
},
9 months ago
"Apis": {
"Hyd": {
"BaseUrl": "www.baidu.com",
"下单": "1",
"查询": "2",
"下单2": "3",
"下单3": "4"
}
},
// Jwt授权模式需要配置IdentityServer4模式不需要配置
"Audience": {
"Secret": "sdfsdfsrty45634kkhllghtdgdfss345t678fs", //不要太短16位+
"SecretFile": "C:\\my-file\\entrust.settle.audience.secret.txt", //安全。内容就是Secret
"Issuer": "EntrustSettle",
"Audience": "wr"
},
"Middleware": {
"RequestResponseLog": {
"Enabled": true,
"LogToFile": {
"Enabled": true
},
"LogToDB": {
"Enabled": true
}
},
"IPLog": {
"Enabled": true,
"LogToFile": {
"Enabled": true
},
"LogToDB": {
"Enabled": true
}
},
"RecordAccessLogs": {
"Enabled": true,
"LogToFile": {
"Enabled": true
},
"LogToDB": {
"Enabled": true
},
"IgnoreApis": "/api/test/demo1,/api/test/demo2"
},
"SignalR": {
"Enabled": false
},
"SignalRSendLog": {
"Enabled": false
},
"IpRateLimit": {
"Enabled": false
},
"EncryptionResponse": {
"Enabled": false,
"AllApis": false,
"LimitApis": [
"/api/Login/GetJwtTokenSecret"
]
},
"EncryptionRequest": {
"Enabled": false,
"AllApis": false,
"LimitApis": [
"/api/Login/GetJwtTokenSecret"
]
}
},
"AppSettings": {
// 是否将日志记录到库中的总开关包括Sql日志、业务日志
9 months ago
"LogToDb": false,
// 缓存
"CachingAOP": {
"Enabled": true
},
// 服务日志
"LogAOP": {
9 months ago
"Enabled": false,
"LogToFile": {
"Enabled": true
},
"LogToDB": {
"Enabled": true
}
},
// 事务
"TranAOP": {
"Enabled": true
},
// Sql执行日志
"SqlAOP": {
"Enabled": true,
"LogToFile": {
"Enabled": true
},
"LogToDB": {
"Enabled": true
},
// Sql执行日志控制台输出
"LogToConsole": {
9 months ago
"Enabled": false
}
},
9 months ago
"SeedDBEnabled": false, //生成表结构
"RoutePrefix": "", //路由变量前缀配置
"UseLoadTest": false
},
// DBType对应0=MySql,1=SqlServer,2=Sqlite,3=Oracle,4=PostgreSQL,5=Dm,6=Kdbndp
//
// 主数据库MainDb标识当前项目的主数据库。相应连接字符串中的“Enabled”标志必须设置为“true”。
// 从库Slaves确保数据库类型一致。可用于读写分离。
// 日志数据库Log用于日志记录的数据库。相应连接字符串中的“Enabled”标志必须设置为“true”。
//
// 故障转移方案:
// 如果主数据库发生故障将自动切换到备用连接。备用连接的“ConnId”应配置为主数据库的“ConnId”加上一个数字。
// 例如如果主数据库的“ConnId”为“Main”那么备用连接的“ConnId”将为“Main1”。
// 主数据库和备用数据库不需要是相同类型。备用数据库将不由程序维护,需要手动维护。
"MainDB": "Main",
"DBS": [
{
"ConnId": "Main",
"DBType": 0,
"Enabled": true,
"Connection": "server=rm-m5e06xxqpa68a68ry5o.mysql.rds.aliyuncs.com;Database=EntrustSettle;Uid=rulesengine_admin;Pwd=Rule1qaz2wsx!QAZ;Port=3306;Allow User Variables=True;Charset=utf8;TreatTinyAsBoolean=false;",
"Slaves": [
{
"HitRate": 0, // 值越大,优先级越高 0不使用
"Connection": "server=localhost;Database=(unused);Uid=root;Pwd=qwer1234;Port=3306;Allow User Variables=True;Charset=utf8;TreatTinyAsBoolean=false;"
}
]
},
{
"ConnId": "Main2",
"DBType": 2,
"Enabled": false,
"Connection": "(unused).db",
"Slaves": [
{
"HitRate": 0, // 值越大,优先级越高 0不使用
"Connection": "(unused).db"
}
]
},
{
"ConnId": "Log", //日志库连接固定名称,不可更改
"DBType": 0,
9 months ago
"Enabled": true,
"HitRate": 50,
"Connection": "server=rm-m5e06xxqpa68a68ry5o.mysql.rds.aliyuncs.com;Database=EntrustSettleLog;Uid=rulesengine_admin;Pwd=Rule1qaz2wsx!QAZ;Port=3306;Allow User Variables=True;"
9 months ago
},
{
"ConnId": "PingTai",
"DBType": 1,
"Enabled": true,
"Connection": "Data Source =60.209.125.238,32009; Initial Catalog=TestDsPingTai; Persist Security Info=True; User ID =sa; Password=Djy@Sql2022.test;pooling=true"
}
],
"Mongo": {
"ConnectionString": "mongodb://nosql.data",
"Database": "BlogCoreDb"
},
"IpRateLimiting": {
"EnableEndpointRateLimiting": true, //False: globally executed, true: executed for each
"StackBlockedRequests": false, //False: Number of rejections should be recorded on another counter
"RealIpHeader": "X-Real-IP",
"ClientIdHeader": "X-ClientId",
"IpWhitelist": [], //白名单
"EndpointWhitelist": [ "get:/api/xxx", "*:/api/yyy" ],
"ClientWhitelist": [ "dev-client-1", "dev-client-2" ],
"QuotaExceededResponse": {
"Content": "{{\"status\":429,\"msg\":\"访问过于频繁,请稍后重试\",\"success\":false}}",
"ContentType": "application/json",
"StatusCode": 429
},
"HttpStatusCode": 429, //返回状态码
"GeneralRules": [ //api规则,结尾一定要带*
{
"Endpoint": "*:/api/entrust*",
"Period": "1m",
"Limit": 20
},
{
"Endpoint": "*/api/*",
"Period": "1s",
"Limit": 3
},
{
"Endpoint": "*/api/*",
"Period": "1m",
"Limit": 30
},
{
"Endpoint": "*/api/*",
"Period": "12h",
"Limit": 500
}
]
},
"Serilog": {
"MinimumLevel": {
/* VerboseDebugInformationWarningErrorFatal */
"Default": "Debug",
"Override": {
9 months ago
"Microsoft": "Information",
"Microsoft.AspNetCore": "Warning",
"System": "Warning",
"System.Net.Http.HttpClient": "Warning",
"Quartz": "Information"
}
}
},
"QuartzNetJob": {
"Enabled": false
},
9 months ago
"TimedJob": {
"Enabled": false
},
"Redis": {
9 months ago
"Enabled": false,
9 months ago
"ConnectionString": "127.0.0.1:6379,defaultDatabase=3",
"InstanceName": "" //Key前缀
},
"RabbitMQ": {
"Enabled": true,
"Connection": "60.209.125.238:40101/audit_booking",
"UserName": "audit_booking_user",
"Password": "djy^2024",
"RetryCount": 3
},
"Kafka": {
"Enabled": false,
"Servers": "localhost:9092",
"Topic": "entrustsettle",
"GroupId": "entrustsettle-consumer",
"NumPartitions": 3 //主题分区数量
},
"EventBus": {
"Enabled": false,
"SubscriptionClientName": "EntrustSettle"
}
}