local.yml 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. env: local
  2. # ip白名单
  3. ip_allowlist:
  4. enabled: true
  5. ips:
  6. - "127.0.0.1"
  7. - "::1"
  8. - "110.42.96.15"
  9. # ip限流
  10. rate_limit:
  11. enabled: true
  12. rate: 5 # 每秒允许的请求数
  13. burst: 5 # 令牌桶的大小
  14. http:
  15. host: 127.0.0.1
  16. port: 9999
  17. security:
  18. api_sign:
  19. app_key: 123456
  20. app_security: 123456
  21. jwt:
  22. key: 1234
  23. data:
  24. mysql:
  25. user: root:123456@tcp(127.0.0.1:3380)/user?charset=utf8mb4&parseTime=True&loc=Local
  26. redis:
  27. addr: 127.0.0.1:6350
  28. password: ""
  29. db: 0
  30. read_timeout: 0.2s
  31. write_timeout: 0.2s
  32. log:
  33. log_level: warn
  34. encoding: console # json or console
  35. log_file_name: "./storage/logs/server.log"
  36. max_backups: 30 # 日志文件最多保存多少个备份
  37. max_age: 7 # 文件最多保存多少天
  38. max_size: 1024 # 每个日志文件保存的最大尺寸 单位:M
  39. compress: true # 是否压缩
  40. ip:
  41. network_interface: bond0
  42. ip_label: CDN-NODE
  43. script_path: /etc/network/