AdminNETConfig.json 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. {
  2. "SpecificationDocumentSettings": {
  3. "DocumentTitle": "Admin.NET 框架",
  4. "GroupOpenApiInfos": [
  5. {
  6. "Group": "Default",
  7. "Title": "Admin.NET",
  8. "Description": "让 .NET 开发更简单、更通用、更流行。前后端分离架构(.NET6/Vue3),开箱即用紧随前沿技术。<br/><a href='https://gitee.com/zuohuaijun/Admin.NET/'>https://gitee.com/zuohuaijun/Admin.NET</a>",
  9. "Version": "2.0.0"
  10. }
  11. ]
  12. },
  13. "AppSettings": {
  14. "InjectSpecificationDocument": true // 生产环境是否开启Swagger
  15. },
  16. "DynamicApiControllerSettings": {
  17. "LowercaseRoute": false,
  18. "KeepName": true,
  19. "AsLowerCamelCase": true // 小驼峰路由路径
  20. },
  21. "JWTSettings": {
  22. "ValidateIssuerSigningKey": true, // 是否验证密钥,bool 类型,默认true
  23. "IssuerSigningKey": "3c1cbc3f546eda35168c3aa3cb91780fbe703f0996c6d123ea96dc85c70bbc0a", // 密钥,string 类型,必须是复杂密钥,长度大于16
  24. "ValidateIssuer": true, // 是否验证签发方,bool 类型,默认true
  25. "ValidIssuer": "Admin.NET", // 签发方,string 类型
  26. "ValidateAudience": true, // 是否验证签收方,bool 类型,默认true
  27. "ValidAudience": "Admin.NET", // 签收方,string 类型
  28. "ValidateLifetime": true, // 是否验证过期时间,bool 类型,默认true,建议true
  29. "ExpiredTime": 10080, // 过期时间,long 类型,单位分钟,默认20分钟
  30. "ClockSkew": 5 // 过期时间容错值,long 类型,单位秒,默认5秒
  31. },
  32. "RefreshToken": {
  33. "ExpiredTime": 20160 // 过期时间单位分钟(一般 refresh_token 的有效时间 > 2 * access_token 的有效时间)
  34. },
  35. "CorsAccessorSettings": {
  36. "WithExposedHeaders": [ "access-token", "x-access-token", "Content-Disposition" ]
  37. },
  38. "Cache": {
  39. "CacheType": "MemoryCache", // RedisCache
  40. "RedisConnectionString": "127.0.0.1:6379,password=,defaultDatabase=2",
  41. "InstanceName": "zuo_"
  42. },
  43. "SnowId": {
  44. "WorkerId": 5 // 取值范围0~63,默认1
  45. },
  46. "Upload": {
  47. "Path": "upload/{yyyy}/{MM}/{dd}", // 文件上传目录
  48. "MaxSize": 1048576,
  49. "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" ]
  50. },
  51. "OSSProvider": {
  52. "IsEnable": false,
  53. "Provider": 2, // 0.Invalid/1.Minio/2.Aliyun/3.QCloud/4.Qiniu/5.HuaweiCloud
  54. "Endpoint": "",
  55. "Region": "",
  56. "AccessKey": "",
  57. "SecretKey": "",
  58. "IsEnableHttps": true,
  59. "IsEnableCache": true
  60. }
  61. }