NAC_Blockchain/nac-api-server/config.toml.example

33 lines
785 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# NAC API服务器配置文件示例
# 复制此文件为 config.toml 并根据实际情况修改
[server]
# 服务器监听地址
host = "0.0.0.0"
# 服务器监听端口
port = 8080
# 日志级别: trace, debug, info, warn, error
log_level = "info"
[blockchain]
# NAC区块链RPC节点地址
rpc_url = "http://localhost:8545"
# RPC请求超时时间
timeout_secs = 30
[security]
# JWT密钥生产环境必须修改
jwt_secret = "CHANGE-THIS-SECRET-IN-PRODUCTION-PLEASE-USE-STRONG-SECRET"
# JWT过期时间小时
jwt_expiration_hours = 24
# 是否启用HTTPS
enable_https = false
# 允许的跨域来源(* 表示允许所有)
allowed_origins = ["*"]
[rate_limit]
# 每秒允许的请求数
requests_per_second = 10
# 突发请求容量
burst_size = 20