docs(main): fix misleading APP_BASE_URL comment

warn_if_app_base_url_unset() is unconditional—localhost dev also
emits a WARN (per csrf.rs doc). The main.rs side note claimed
localhost stays silent, contradicting the implementation.
This commit is contained in:
xfy 2026-06-29 15:59:54 +08:00
parent 62fe87961f
commit 5e4f32f2ab

View File

@ -241,7 +241,7 @@ fn main() {
}
// 提醒部署者显式设置 APP_BASE_URL未设置时 CSRF 会回退到 Host 头,
// 反向代理后存在绕过风险(本地 localhost 开发会静默,不打日志)。
// 反向代理后存在绕过风险。本地开发未设置时也会打一条 WARN代价可接受)。
api::csrf::warn_if_app_base_url_unset();
// 启动前执行数据库迁移。阻塞:完成前不监听端口。