NewGaoKaoApi/New_College.Api/appsettings.json

253 lines
8.7 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

{
"Weixin": {
"Appid": "wx05e75004e657527c",
"Secret": "9383aa5517e1d6bf23404dce9c86b0f1",
//MCHID
"MCHID": "1614987630",
//MCHKey
"KEY": "brapuk6fon0wachiMlth2t3lb4a0h7ji",
//NotifyUrl
"NotifyUrl": "https://zytb.ycymedu.com/api/front/WeixinPay/PayNotify"
},
"Logging": {
"IncludeScopes": false,
"Debug": {
"LogLevel": {
"Default": "Warning"
}
},
"Console": {
"LogLevel": {
"Default": "Warning",
"Microsoft.Hosting.Lifetime": "Debug"
}
},
"Log4Net": {
"Name": "New_College"
}
},
"urls": "http://*:8083", // IIS 部署,注释掉
"AllowedHosts": "*",
"AppSettings": {
"RedisCachingAOP": {
"Enabled": true,
"ConnectionString": "127.0.0.1:6379",
"Password": "Vs_.127134"
},
"MemoryCachingAOP": {
"Enabled": true
},
"LogAOP": {
"Enabled": false
},
"TranAOP": {
"Enabled": false
},
"SqlAOP": {
"Enabled": false
},
"Date": "2018-08-28",
"SeedDBEnabled": true, //只生成表结构
"SeedDBDataEnabled": false, //生成表,并初始化数据
"Author": "New_College"
},
// 请配置MainDB为你想要的主库的ConnId值,并设置对应的Enabled为true
// *** 单库操作,把 MutiDBEnabled 设为false ***
// *** 多库操作,把 MutiDBEnabled 设为true其他的从库Enabled也为true **
// 具体配置看视频https://www.bilibili.com/video/BV1BJ411B7mn?p=6
"MainDB": "WMBLOG_MYSQL", //当前项目的主库所对应的连接字符串的Enabled必须为true
"MutiDBEnabled": false, //是否开启多库模式
"CQRSEnabled": false, //是否开启读写分离模式,必须是单库模式且数据库类型一致比如都是SqlServer
"DBS": [
/*
DBType
MySql = 0,
SqlServer = 1,
Sqlite = 2,
Oracle = 3,
PostgreSQL = 4
*/
{
"ConnId": "WMBLOG_SQLITE",
"DBType": 2,
"Enabled": false,
"HitRate": 50, // 值越大,优先级越高
"Connection": "WMBlog.db" //sqlite只写数据库名就行
},
{
"ConnId": "WMBLOG_MSSQL_1",
"DBType": 1,
"Enabled": false,
"HitRate": 40,
"Connection": "Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=WMBLOG_MSSQL_1;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
"ProviderName": "System.Data.SqlClient"
},
{
"ConnId": "WMBLOG_MSSQL_2",
"DBType": 1,
"Enabled": false,
"HitRate": 30,
"Connection": "Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=WMBLOG_MSSQL_2;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
"ProviderName": "System.Data.SqlClient"
},
{
"ConnId": "WMBLOG_MYSQL",
"DBType": 0,
"Enabled": true,
"HitRate": 20,
"Connection": "Server=192.168.103.102; Port=3306;SslMode=None;Database=volunteerapp; Uid=ycymedu; Pwd=Vs..127134;CharSet=utf8mb4"
},
{
"ConnId": "WMBLOG_ORACLE",
"DBType": 3,
"Enabled": false,
"HitRate": 10,
"Connection": "Provider=OraOLEDB.Oracle; Data Source=WMBlogDB; User Id=sss; Password=789;",
"OracleConnection_other1": "User ID=sss;Password=789;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.8.65)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME = orcl)))"
}
],
"Audience": {
"Secret": "sdfsdfsrty25634kkhllghtdgdfss345t678fs", //不要太短16位+
"SecretFile": "C:\\my-file\\new_college.audience.secret.txt", //安全。内容就是Secret
"Issuer": "New_College",
"Audience": "wr"
},
"Startup": {
"Cors": {
"PolicyName": "CorsIpAccess", //策略名称
"EnableAllIPs": 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:6391,http://localhost:6391,http://127.0.0.1:8080,http://localhost:8080,http://web.riyuemedia.cn,https://payment.riyuemedia.cn"
},
"AppConfigAlert": {
"Enabled": true
},
"ApiName": "New_College",
"IdentityServer4": {
"Enabled": false, // 这里默认是false表示使用jwt如果设置为true则表示系统使用Ids4模式
"AuthorizationUrl": "https://ids.neters.club", // 认证中心域名
"ApiName": "new_college.api" // 资源服务器
}
},
"Middleware": {
"RequestResponseLog": {
"Enabled": false
},
"IPLog": {
"Enabled": true
},
"RecordAccessLogs": {
"Enabled": true
},
"SignalR": {
"Enabled": false
},
"QuartzNetJob": {
"Enabled": true
},
"Consul": {
"Enabled": false
},
"IpRateLimit": {
"Enabled": true
}
},
"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": [], //ip访问白名单
"EndpointWhitelist": [ "get:/api/xxx", "*:/api/yyy" ],
"ClientWhitelist": [ "dev-client-1", "dev-client-2" ],
"HttpStatusCode": 429, //返回状态码
"GeneralRules": [ //api规则,结尾一定要带*
{
"Endpoint": "*:/api/blog*",
"Period": "1m",
"Limit": 200000
},
{
"Endpoint": "*/api/*",
"Period": "1s",
"Limit": 300000
},
{
"Endpoint": "*/api/*",
"Period": "1m",
"Limit": 3000000
},
{
"Endpoint": "*/api/*",
"Period": "12h",
"Limit": 50000000000
}
]
},
"ConsulSetting": {
"ServiceName": "BlogCoreService",
"ServiceIP": "localhost",
"ServicePort": "8081",
"ServiceHealthCheck": "/healthcheck",
"ConsulAddress": "http://localhost:8500"
},
"AliyunSmsSenderConfig": {
"accessKeyId": "LTAI4GK6SGUmMX3J9Wyzyt6C",
"accessKeySecret": "vTUjL4so42kiuctWEb6WoaxtXs3MLS"
},
"AliYunOss": {
"wendpoint": "https://static-data.ycymedu.com",
"accessKeyId": "LTAI5tKs3TXSbt7E4WMDcxwR",
"accessKeySecret": "EvC8MjRaQC1kHubgU4MtecZnofOb0v",
"bucket": "static-data-ycymedu",
"endpoint": "https://oss-cn-shanghai.aliyuncs.com"
},
"Casdoor": {
"Endpoint": "http://192.168.103.119:8000",
"OrganizationName": "六纬生涯",
"ApplicationName": "六纬生涯",
"ApplicationType": "webapi",
"ClientId": "776d639918192c449537",
"ClientSecret": "d556f0692052a2df56614282dd86895b04783262",
"CallbackPath": "http://192.168.103.119:8000/login/oauth/authorize?client_id=ae6bdccc3a7821232b31&response_type=code&redirect_uri=http://192.168.103.100:8083/callback&scope=read&state=casdoor",
"RequireHttpsMetadata": false
},
"SenparcWeixinSetting": {
//以下为 Senparc.Weixin 的 SenparcWeixinSetting 微信配置
//注意:所有的字符串值都可能被用于字典索引,因此请勿留空字符串(但可以根据需要,删除对应的整条设置)!
//微信全局
"IsDebug": true,
//以下不使用的参数可以删除key 修改后将会失效
//公众号
"Token": "#{Token}#", //说明:字符串内两侧#和{}符号为 Azure DevOps 默认的占位符格式,如果您有明文信息,请删除同占位符,修改整体字符串,不保留#和{},如:{"Token": "MyFullToken"}
"EncodingAESKey": "#{EncodingAESKey}#",
"WeixinAppId": "#{WeixinAppId}#",
"WeixinAppSecret": "#{WeixinAppSecret}#",
//微信支付V3
"TenPayV3_AppId": "#{TenPayV3_AppId}#",
"TenPayV3_AppSecret": "#{TenPayV3_AppSecret}#",
"TenPayV3_SubAppId": "#{TenPayV3_SubAppId}#",
"TenPayV3_SubAppSecret": "#{TenPayV3_SubAppSecret}#",
"TenPayV3_MchId": "#{TenPayV3_MchId}#",
"TenPayV3_SubMchId": "#{TenPayV3_SubMchId}#", //子商户,没有可留空
"TenPayV3_Key": "#{TenPayV3_Key}#",
"TenPayV3_TenpayNotify": "#{TenPayV3_TenpayNotify}#", //https://YourDomainName/TenpayApiV3/PayNotifyUrl
/*
* 1
* 2~/App_Data/cert/apiclient_key.pem App_Data
*/
"TenPayV3_PrivateKey": "#{TenPayV3_PrivateKey}#", //(新)证书私钥
"TenPayV3_SerialNumber": "#{TenPayV3_SerialNumber}#", //(新)证书序列号
"TenPayV3_ApiV3Key": "#{TenPayV3_APIv3Key}#" //APIv3 密钥
}
}