Files
verify/backend/config.yaml
T
admin f997035972 fix(protect): 加壳产物不再把 127.0.0.1 写进壳 cfg
AcePanel 默认反代模板 proxy_set_header Host $proxy_host,后端看到的 Host 是
127.0.0.1:9998,于是每个产物的 cfg 都成了 https://127.0.0.1:9998/...,
到客户机上必然连不上。

- baseURL() 改为:app.public_url > X-Forwarded-Host > Host;推断出本机/内网
  地址时直接让加壳任务报错,不再静默产出坏产物
- config.yaml 增加 app.public_url(生产可直接写死站点地址)
- 新增 4 个单测(含 loopback 必须报错)
- docs/protect-base-url.md 记录事故与自查方法
2026-11-24 08:42:21 +08:00

28 lines
578 B
YAML
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.
app:
name: "verification-platform"
env: "development"
port: "8080"
jwt_secret: "your-secret-key-change-in-production"
jwt_expire_hours: "24"
# 加壳时写进壳 cfg 的站点根地址;留空则按请求头推断(反代需要传 X-Forwarded-Host)
public_url: ""
database:
host: "localhost"
port: "3306"
name: "verification_platform"
username: "root"
password: "root123456"
charset: "utf8mb4"
max_idle_conns: "10"
max_open_conns: "100"
redis:
host: "localhost"
port: "6379"
password: ""
db: "0"
log:
level: "info"
format: "json"