添加环境变量

This commit is contained in:
qianhao.xu 2024-01-13 16:19:32 +08:00
parent 2e90b9cf09
commit eb5ee7467c
4 changed files with 147 additions and 145 deletions

View File

@ -18,5 +18,6 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<ProjectGuid>e5497bb4-b0c1-4794-9fae-163f626ec399</ProjectGuid>
<SelfContained>true</SelfContained>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<EnvironmentName>production</EnvironmentName>
</PropertyGroup>
</Project>

View File

@ -15,7 +15,7 @@
"launchUrl": "",
"applicationUrl": "http://localhost:8889",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
"ASPNETCORE_ENVIRONMENT": "development"
}
}
}

View File

@ -1,144 +1 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"urls": "http://localhost:8888", //appurldevServer
"dbConfigs": [
{
//"Conn": "Data Source=147.116.122.230;User ID=root;Password=123456;Initial Catalog=ZrAdmin;",
"Conn": "Data Source=47.116.122.230;Port=3307;User ID=root;Password=123456;Initial Catalog=ZrAdmin;",
"DbType": 0, // MySql = 0, SqlServer = 1, Oracle = 3PgSql = 4
"ConfigId": "0", //
"IsAutoCloseConnection": true
}
//...
],
//
"CodeGenDbConfig": {
//{dbName}
"Conn": "Data Source=47.116.122.230;User ID=root;Password=123456;Initial Catalog={dbName};",
"DbType": 0,
"IsAutoCloseConnection": true,
"DbName": "ZrAdmin" //
},
"corsUrls": [ "http://localhost:8887", "http://localhost:8886" ], //","
"JwtSettings": {
"Issuer": "ZRAdmin.NET", //token
"Audience": "ZRAdmin.NET", //token
"SecretKey": "SecretKey-ZRADMIN.NET-20210101",
"Expire": 1440 //jwt
},
"InjectClass": [ "ZR.Repository", "ZR.Service", "ZR.Tasks" ], //
"ShowDbLog": true,//db
"InitDb": false, //db
"DemoMode": false, //
"Upload": {
"uploadUrl": "http://localhost:8888", //访
"localSavePath": "", // wwwroot
"maxSize": 15, // 15M
"notAllowedExt": [ ".bat", ".exe", ".jar", ".js" ]
},
//
"ALIYUN_OSS": {
"REGIONID": "", //egcn-hangzhou
"KEY": "XX",
"SECRET": "XX",
"bucketName": "bucketName",
"domainUrl": "http://xxx.xxx.com", //访
"maxSize": 100 // 100M
},
//
"WxCorp": {
"AgentID": "1",
"CorpID": "1",
"CorpSecret": "1",
"SendUser": "@all"
},
//
"WxOpen": {
"AppID": "",
"AppSecret": ""
},
//
"gen": {
//
"showApp": false,
//
"autoPre": true,
"author": "admin",
"tablePrefix": "sys_", //"表前缀(生成类名不会包含表前缀,多个用逗号分隔)",
"vuePath": "", //egD:\Work\ZRAdmin-Vue3
"csharpTypeArr": {
"string": [ "varchar", "nvarchar", "text", "longtext" ],
"int": [ "int", "integer", "smallint", "int4", "int8", "int2" ],
"long": [ "bigint", "number" ],
"float": [ "numeric", "real", "float" ],
"decimal": [ "money", "decimal", "smallmoney" ],
"dateTime": [ "date", "datetime", "datetime2", "smalldatetime", "timestamp" ],
"byte": [ "tinyint" ],
"bool": [ "bit" ]
}
},
//
"MailOptions": {
//
"FromName": "system",
//
"FromEmail": "", //egxxxx@qq.com
//
"Password": "",
//
"Smtp": "smtp.qq.com",
"Port": 587,
"Signature": "系统邮件,请勿回复!",
"UseSsl": true
},
//redis
"RedisServer": {
"open": 0, //redis
"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:"
},
//
"IpRateLimiting": {
"EnableEndpointRateLimiting": true,
"StackBlockedRequests": false,
"RealIpHeader": "X-Real-IP",
"ClientIdHeader": "X-ClientId",
"HttpStatusCode": 429,
"EndpointWhitelist": [ "post:/system/dict/data/types", "*:/msghub/negotiate", "*:/LogOut", "*:/common/uploadfile" ],
"QuotaExceededResponse": {
"Content": "{{\"code\":429,\"msg\":\"访问过于频繁,请稍后重试\"}}",
"ContentType": "application/json",
"StatusCode": 429
},
//api,*
"GeneralRules": [
{
"Endpoint": "*:/captchaImage",
//{}{}使s, m, h, d
"Period": "3s",
"Limit": 5
},
{
"Endpoint": "((post)|(put)):*",
"Period": "3s",
"Limit": 1
}
],
"IpRateLimitPolicies": {
//ip
"IpRules": [
]
}
},
//
"CaptchaOptions": {
"IgnoreCase": true //
}
}
{}

View File

@ -0,0 +1,144 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"urls": "http://localhost:8888", //appurldevServer
"dbConfigs": [
{
//"Conn": "Data Source=147.116.122.230;User ID=root;Password=123456;Initial Catalog=ZrAdmin;",
"Conn": "Data Source=47.116.122.230;Port=3307;User ID=root;Password=123456;Initial Catalog=ZrAdmin;",
"DbType": 0, // MySql = 0, SqlServer = 1, Oracle = 3PgSql = 4
"ConfigId": "0", //
"IsAutoCloseConnection": true
}
//...
],
//
"CodeGenDbConfig": {
//{dbName}
"Conn": "Data Source=47.116.122.230;User ID=root;Password=123456;Initial Catalog={dbName};",
"DbType": 0,
"IsAutoCloseConnection": true,
"DbName": "ZrAdmin" //
},
"corsUrls": [ "http://localhost:8887", "http://localhost:8886" ], //","
"JwtSettings": {
"Issuer": "ZRAdmin.NET", //token
"Audience": "ZRAdmin.NET", //token
"SecretKey": "SecretKey-ZRADMIN.NET-20210101",
"Expire": 1440 //jwt
},
"InjectClass": [ "ZR.Repository", "ZR.Service", "ZR.Tasks" ], //
"ShowDbLog": true,//db
"InitDb": false, //db
"DemoMode": false, //
"Upload": {
"uploadUrl": "http://localhost:8888", //访
"localSavePath": "", // wwwroot
"maxSize": 15, // 15M
"notAllowedExt": [ ".bat", ".exe", ".jar", ".js" ]
},
//
"ALIYUN_OSS": {
"REGIONID": "", //egcn-hangzhou
"KEY": "XX",
"SECRET": "XX",
"bucketName": "bucketName",
"domainUrl": "http://xxx.xxx.com", //访
"maxSize": 100 // 100M
},
//
"WxCorp": {
"AgentID": "1",
"CorpID": "1",
"CorpSecret": "1",
"SendUser": "@all"
},
//
"WxOpen": {
"AppID": "",
"AppSecret": ""
},
//
"gen": {
//
"showApp": false,
//
"autoPre": true,
"author": "admin",
"tablePrefix": "sys_", //"表前缀(生成类名不会包含表前缀,多个用逗号分隔)",
"vuePath": "", //egD:\Work\ZRAdmin-Vue3
"csharpTypeArr": {
"string": [ "varchar", "nvarchar", "text", "longtext" ],
"int": [ "int", "integer", "smallint", "int4", "int8", "int2" ],
"long": [ "bigint", "number" ],
"float": [ "numeric", "real", "float" ],
"decimal": [ "money", "decimal", "smallmoney" ],
"dateTime": [ "date", "datetime", "datetime2", "smalldatetime", "timestamp" ],
"byte": [ "tinyint" ],
"bool": [ "bit" ]
}
},
//
"MailOptions": {
//
"FromName": "system",
//
"FromEmail": "", //egxxxx@qq.com
//
"Password": "",
//
"Smtp": "smtp.qq.com",
"Port": 587,
"Signature": "系统邮件,请勿回复!",
"UseSsl": true
},
//redis
"RedisServer": {
"open": 0, //redis
"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:"
},
//
"IpRateLimiting": {
"EnableEndpointRateLimiting": true,
"StackBlockedRequests": false,
"RealIpHeader": "X-Real-IP",
"ClientIdHeader": "X-ClientId",
"HttpStatusCode": 429,
"EndpointWhitelist": [ "post:/system/dict/data/types", "*:/msghub/negotiate", "*:/LogOut", "*:/common/uploadfile" ],
"QuotaExceededResponse": {
"Content": "{{\"code\":429,\"msg\":\"访问过于频繁,请稍后重试\"}}",
"ContentType": "application/json",
"StatusCode": 429
},
//api,*
"GeneralRules": [
{
"Endpoint": "*:/captchaImage",
//{}{}使s, m, h, d
"Period": "3s",
"Limit": 5
},
{
"Endpoint": "((post)|(put)):*",
"Period": "3s",
"Limit": 1
}
],
"IpRateLimitPolicies": {
//ip
"IpRules": [
]
}
},
//
"CaptchaOptions": {
"IgnoreCase": true //
}
}