{ "ConnectionStrings": { "DbType": "SqlServer", //数据库将支持两种模式【SqlServer,MySql】 "SqlConnection": "Server=localhost\\SQLEXPRESS;User ID=sa;Password=123456;Database=CoreShopProfessional;MultipleActiveResultSets=true;pooling=true;min pool size=5;max pool size=32767;connect timeout=20;Encrypt=True;TrustServerCertificate=True;" //SqlServer数据库连接字符串,需要开启数据库连接复用【MultipleActiveResultSets=true】 // 如果采用容器化部署Service 要写成mysql的服务名,否则写地址 //"SqlConnection": "Server=127.0.0.1;Port=3306;Database=CoreShopProfessional;Uid=CoreShopProfessional;Pwd=CoreShopProfessional;CharSet=utf8;pooling=true;SslMode=None;Allow User Variables=true;Convert Zero Datetime=True;Allow Zero Datetime=True;" // Mysql数据库链接字符串,请保持后面的属性别少。经过测试,mysql版本需要5.7或以上 }, //定时任务管理面板的账户密码 "HangFire": { "Login": "CoreShopProfessional", "PassWord": "CoreShopProfessional" }, "AppConfig": { "AppUrl": "http://192.168.0.113:1987/", //后端管理地址 "AppPcUrl": "https://pc.test.pro.coreshop.cn/", //PC端访问地址 "AppH5Url": "https://h5.test.pro.coreshop.cn/", //H5端访问地址 "AppInterFaceUrl": "http://192.168.0.113:2015/", //接口请求地址 "AppVersion": "CoreShopProfessional v0.7.3" }, //redis为必须启动项,请保持redis为正常可用 "RedisConfig": { "UseCache": true, //启用redis作为内存选择 "UseTimedTask": true, //启用redis作为定时任务 // 如果采用容器化部署Service 要写成redis的服务名,否则写地址 "ConnectionString": "127.0.0.1:6379,password=,connectTimeout=30000,responseTimeout=30000,abortConnect=false,connectRetry=1,syncTimeout=10000,DefaultDatabase=9" //redis数据库连接字符串 }, //jwt授权认证的一些设置 "JwtConfig": { "SecretKey": "", //请自主填写一段英文数字等作为token令牌,16位+ "Issuer": "", //颁发者身份标识,如CoreShop.Professional "Audience": "coreshop" //期望的接收人,如core,cms等 }, //跨域设置 "Cors": { "PolicyName": "CorsIpAccess", //策略名称 "EnableAllIPs": false, //是否应用所有的IP,如设置为true,则取消跨域限制 // 支持多个域名端口,注意端口号后不要带/斜杆:比如localhost:8000/,是错的 // 注意,http://127.0.0.1:1818 和 http://localhost:1818 是不一样的 "IPs": "http://127.0.0.1:4000,http://127.0.0.1:5000,http://127.0.0.1:6000,http://localhost:4000,http://localhost:5000,http://localhost:6000" }, //中间件 "Middleware": { //记录请求和响应数据 "RequestResponseLog": { "Enabled": false }, //记录用户方访问数据 "RecordAccessLogs": { "Enabled": false, //是否开启记录操作日志功能。 "EnabledFileMode": false, //是否开启记录到文件功能。(影响效率,接口不建议开启) "EnabledDbMode": false, //是否开启记录到数据库模式。(影响效率,后台可开启,接口不建议开启,因为数据库会存储大量的用于请求数据和返回数据。) "IgnoreApis": "/api/tools/getuserinfo,/api/tools/getNavs,/api/CodeGenerator/CodeGenDown" //使用小写逗号分隔 }, //记录IP请求数据 "IPLog": { "Enabled": false } }, //UseRateLimiter限流中间件配置 "MyRateLimitOptions": { "MyRateLimit": { //一个窗口中允许的最大允许计数器数。 在将这些选项传递给 的FixedWindowRateLimiter构造函数时,必须设置为值 > 0。 "PermitLimit": 100, //指定请求的时间范围。 必须设置为大于 Zero 将这些选项传递给 的构造函数 FixedWindowRateLimiter时的值。 "Window": 10, //当 AutoReplenishment 设置为 true 时,内部计时器每 ReplenishmentPeriod 时间补充一次令牌数;当 false 设置为 TryReplenish 时,应用必须对限制器调用 。 "ReplenishmentPeriod": 2, //排队的获取请求的最大累计允许计数。 将这些选项传递给 的FixedWindowRateLimiter构造函数时,必须设置为值 >= 0。 "QueueLimit": 2, "SegmentsPerWindow": 8, "TokenLimit": 10, "TokensPerPeriod": 4, //是否自动补货 "AutoReplenishment": false } }, "Logging": { "LogLevel": { "Default": "Information", "Microsoft": "Warning", "Microsoft.Hosting.Lifetime": "Information" } }, "AllowedHosts": "*", "WeChatOptions": { //公众号 "WeiXinAppId": "", "WeiXinAppSecret": "", "WeiXinEncodingAesKey": "", "WeiXinToken": "", //小程序 "WxOpenAppId": "wx45d700a970238807", "WxOpenAppSecret": "3e9e4e68695ffc62f51b5ec1d1ddf942", "WxOpenToken": "", "WxOpenEncodingAESKey": "" } }