AdminNETConfig.json 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. "LoginInfo": {
  13. "Enabled": false, // 是否开启Swagger登录
  14. "CheckUrl": "/Swagger/CheckUrl",
  15. "SubmitUrl": "/Swagger/SubmitUrl",
  16. "UserName": "admin",
  17. "PassWord": "000000"
  18. }
  19. },
  20. "AppSettings": {
  21. "InjectSpecificationDocument": true // 生产环境是否开启Swagger
  22. },
  23. "DynamicApiControllerSettings": {
  24. "LowercaseRoute": false,
  25. "KeepName": true,
  26. "AsLowerCamelCase": true // 小驼峰路由路径
  27. },
  28. "JWTSettings": {
  29. "ValidateIssuerSigningKey": true, // 是否验证密钥,bool 类型,默认true
  30. "IssuerSigningKey": "3c1cbc3f546eda35168c3aa3cb91780fbe703f0996c6d123ea96dc85c70bbc0a", // 密钥,string 类型,必须是复杂密钥,长度大于16
  31. "ValidateIssuer": true, // 是否验证签发方,bool 类型,默认true
  32. "ValidIssuer": "Admin.NET", // 签发方,string 类型
  33. "ValidateAudience": true, // 是否验证签收方,bool 类型,默认true
  34. "ValidAudience": "Admin.NET", // 签收方,string 类型
  35. "ValidateLifetime": true, // 是否验证过期时间,bool 类型,默认true,建议true
  36. "ExpiredTime": 10080, // 过期时间,long 类型,单位分钟,默认20分钟
  37. "ClockSkew": 5 // 过期时间容错值,long 类型,单位秒,默认5秒
  38. },
  39. "RefreshToken": {
  40. "ExpiredTime": 20160 // 过期时间单位分钟(一般 refresh_token 的有效时间 > 2 * access_token 的有效时间)
  41. },
  42. "CorsAccessorSettings": {
  43. "WithExposedHeaders": [ "access-token", "x-access-token", "Content-Disposition" ]
  44. },
  45. "Cache": {
  46. "CacheType": "MemoryCache", // RedisCache
  47. "RedisConnectionString": "127.0.0.1:6379,password=,defaultDatabase=2",
  48. "InstanceName": "zuo_"
  49. },
  50. "SnowId": {
  51. "WorkerId": 5 // 取值范围0~63,默认1
  52. },
  53. "Upload": {
  54. "Path": "upload/{yyyy}/{MM}/{dd}", // 文件上传目录
  55. "MaxSize": 1048576,
  56. "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" ]
  57. },
  58. "OSSProvider": {
  59. "IsEnable": false,
  60. "Provider": 2, // 0.Invalid/1.Minio/2.Aliyun/3.QCloud/4.Qiniu/5.HuaweiCloud
  61. "Endpoint": "",
  62. "Region": "",
  63. "AccessKey": "",
  64. "SecretKey": "",
  65. "IsEnableHttps": true,
  66. "IsEnableCache": true
  67. }
  68. }