config.j2 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. # zap logger configuration
  2. zap:
  3. level: 'info'
  4. prefix: '[MTP20_Access]'
  5. format: 'console'
  6. director: 'log'
  7. encode-level: 'LowercaseColorLevelEncoder'
  8. stacktrace-key: 'stacktrace'
  9. max-age: 30 # 默认日志留存默认以天为单位
  10. show-line: true
  11. log-in-console: true
  12. # jwt configuration
  13. jwt:
  14. signing-key: 'IVThJraI1R52mE7b'
  15. expires-time: 604800
  16. buffer-time: 86400
  17. issuer: 'Muchinfo'
  18. # redis configuration
  19. redis:
  20. db: 0
  21. addr: {{redis_addr}}
  22. password: ''
  23. # system configuration
  24. system:
  25. env: 'develop' # "develop" & "public", Change to "develop" to skip authentication for development mode
  26. addr: 8888
  27. need-quote-publish: false # 是否需要连接行情发布服务
  28. quote-publish-addr: {{quote_publish_addr}} # 行情发布服务地址
  29. # local configuration
  30. local:
  31. path: 'uploads/file' # 访问路径
  32. store-path: 'uploads/file' # 存储路径
  33. # oracle configuration
  34. oracle:
  35. driver: 'oci8'
  36. address: '{{db_addr}}'
  37. name: '{{db_name}}'
  38. port: '{{db_port}}'
  39. user: '{{db_user}}'
  40. pwd: '{{db_pwd}}'
  41. max-idle-conns: 10
  42. max-open-conns: 100
  43. # rabbitmq configuration
  44. rabbitmq:
  45. url: '{{rabbitmq_url}}'
  46. exchange: 'entry'
  47. # 爱签开放平台配置
  48. asign:
  49. url: '{{asign_url}}' # 测试环境 - https://prev.asign.cn/ 正式环境 - https://oapi.asign.cn/
  50. appId: '{{asign_appId}}'
  51. privateKey: '{{asign_privateKey}}'
  52. notifyUrl: '{{asign_notifyUrl}}'
  53. openApiUrl: '{{asign_openApiUrl}}'
  54. willFaceRedirectUrl: '{{asign_willFaceRedirectUrl}}' # 人脸认证结果回调通知URL,可拼接参数
  55. py: {{asign_py}} # python 执行命令
  56. # 跨域配置
  57. # 需要配合 server/initialize/router.go#L32 使用
  58. cors:
  59. mode: allow-all # 放行模式: allow-all, 放行全部; whitelist, 白名单模式, 来自白名单内域名的请求添加 cors 头; strict-whitelist 严格白名单模式, 白名单外的请求一律拒绝
  60. whitelist:
  61. - allow-origin: example1.com
  62. allow-headers: content-type
  63. allow-methods: GET, POST
  64. expose-headers: Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers, Content-Type
  65. allow-credentials: true # 布尔值
  66. - allow-origin: example2.com
  67. allow-headers: content-type
  68. allow-methods: GET, POST
  69. expose-headers: Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers, Content-Type
  70. allow-credentials: true # 布尔值