AdminNETConfig.json 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. {
  2. "$schema": "https://gitee.com/dotnetchina/Furion/raw/net6/schemas/v3/furion-schema.json",
  3. "SpecificationDocumentSettings": {
  4. "DocumentTitle": "Admin.NET 框架",
  5. "GroupOpenApiInfos": [
  6. {
  7. "Group": "Default",
  8. "Title": "Admin.NET",
  9. "Description": "让 .NET 开发更简单、更通用、更流行。前后端分离架构(.NET6/Vue3),开箱即用紧随前沿技术。<br/><a href='https://gitee.com/zuohuaijun/Admin.NET/'>https://gitee.com/zuohuaijun/Admin.NET</a>",
  10. "Version": "2.0.0"
  11. }
  12. ],
  13. "LoginInfo": {
  14. "Enabled": false, // 是否开启Swagger登录
  15. "CheckUrl": "/Swagger/CheckUrl",
  16. "SubmitUrl": "/Swagger/SubmitUrl",
  17. "UserName": "admin",
  18. "Password": "000000"
  19. }
  20. },
  21. "AppSettings": {
  22. "InjectSpecificationDocument": true // 生产环境是否开启Swagger
  23. },
  24. "DynamicApiControllerSettings": {
  25. "LowercaseRoute": false,
  26. "KeepName": true,
  27. "AsLowerCamelCase": true // 小驼峰路由路径
  28. },
  29. "FriendlyExceptionSettings": {
  30. "DefaultErrorMessage": "系统异常,请联系管理员",
  31. "ThrowBah": true
  32. },
  33. "LocalizationSettings": {
  34. "SupportedCultures": [ "zh-CN", "en-US" ], // 语言列表
  35. "DefaultCulture": "zh-CN" // 默认语言
  36. },
  37. "JWTSettings": {
  38. "ValidateIssuerSigningKey": true, // 是否验证密钥,bool 类型,默认true
  39. "IssuerSigningKey": "3c1cbc3f546eda35168c3aa3cb91780fbe703f0996c6d123ea96dc85c70bbc0a", // 密钥,string 类型,必须是复杂密钥,长度大于16
  40. "ValidateIssuer": true, // 是否验证签发方,bool 类型,默认true
  41. "ValidIssuer": "Admin.NET", // 签发方,string 类型
  42. "ValidateAudience": true, // 是否验证签收方,bool 类型,默认true
  43. "ValidAudience": "Admin.NET", // 签收方,string 类型
  44. "ValidateLifetime": true, // 是否验证过期时间,bool 类型,默认true,建议true
  45. "ExpiredTime": 10080, // 过期时间,long 类型,单位分钟,默认20分钟
  46. "ClockSkew": 5 // 过期时间容错值,long 类型,单位秒,默认5秒
  47. },
  48. "RefreshToken": {
  49. "ExpiredTime": 20160 // 过期时间单位分钟(一般 refresh_token 的有效时间 > 2 * access_token 的有效时间)
  50. },
  51. "CorsAccessorSettings": {
  52. "WithExposedHeaders": [ "access-token", "x-access-token", "Content-Disposition" ]
  53. },
  54. "Cache": {
  55. "CacheType": "MemoryCache", // RedisCache
  56. "RedisConnectionString": "127.0.0.1:6379,password=,defaultDatabase=2",
  57. "InstanceName": "zuo_"
  58. },
  59. "SnowId": {
  60. "WorkerId": 5 // 取值范围0~63,默认1
  61. },
  62. "Upload": {
  63. "Path": "upload/{yyyy}/{MM}/{dd}", // 文件上传目录
  64. "MaxSize": 1048576,
  65. "ContentType": [ "image/jpg", "image/png", "image/jpeg", "image/gif", "image/bmp", "text/plain", "application/pdf", "application/msword", "application/vnd.ms-excel", "application/vnd.ms-powerpoint", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.openxmlformats-officedocument.wordprocessingml.document" ]
  66. },
  67. "OSSProvider": {
  68. "IsEnable": false,
  69. "Provider": 2, // 0.Invalid/1.Minio/2.Aliyun/3.QCloud/4.Qiniu/5.HuaweiCloud
  70. "Endpoint": "",
  71. "Region": "",
  72. "AccessKey": "",
  73. "SecretKey": "",
  74. "IsEnableHttps": true,
  75. "IsEnableCache": true
  76. },
  77. "Email": {
  78. "Server": "smtp.163.com", // 主机
  79. "Port": 465, // 端口 465/994 25
  80. "SenderName": "系统邮件", // 发送者名称
  81. "SenderEmail": "zuohuaijun@163.com", // 发件者邮箱
  82. "ToEmail": "515096995@qq.com", // 接收人邮箱
  83. "Account": "zuohuaijun@163.com", // 发件邮箱账号
  84. "Password": "XXXXXXXXXXXXXXXXX", // 发件邮箱密码
  85. "Security": true // 启用SSL和TLS
  86. }
  87. }