Files
cpdaily_xiaozhushou/backed/config.toml.example
T
becomer 20921c6317 chore: 生产配置移出版本库, 提供脱敏模板
backed/config.toml 内含生产数据库/Redis/JWT/captcha 凭证,随仓库分发
将导致凭证泄露(已实测凭仓库内 JWT 密钥可离线伪造超管 token)。
本地文件保留(git rm --cached 不删磁盘),新增 config.toml.example
脱敏模板说明部署方式;生产配置在服务器 /opt 下由容器挂载,不受影响。
2026-09-03 15:32:11 +08:00

44 lines
1.1 KiB
TOML

# 配置文件模板:复制为 config.toml 并按环境填写真实值。
# 注意:本文件随仓库分发,禁止填写任何真实凭证(数据库/Redis/JWT/第三方密钥)。
# 生产配置存放于服务器 /opt/cpdaily-xiaozhushou/config.toml(容器以挂载方式读取),
# 请勿将生产 config.toml 提交进 git。
[server]
port = 8093
mode = "release"
[database]
host = "127.0.0.1"
port = 3306
user = "your_db_user"
password = "your_db_password"
dbname = "xiaozhushou"
[jwt]
# 生产环境必须使用强随机密钥(openssl rand -hex 32),示例值仅用于本地开发,切勿用于生产。
secret = "dev-only-change-me-please"
accessExpire = 3600
refreshExpire = 864000
[captcha]
width = 150
height = 46
length = 4
[cpdaily]
appVersion = "9.8.8"
systemVersion = "iOS 17"
calVersion = "first_v4"
sliderIds = ["1018764144934965", "sdhyxy", "hqdx"]
captchaBaseUrl = "http://127.0.0.1:8890"
captchaApiKey = "your_captcha_api_key"
[agent]
systemCdkPrice = 10.0
[redis]
host = "127.0.0.1"
port = 6379
password = "your_redis_password"
db = 0