fn site_base_url(headers: &HeaderMap) -> String
推导站点绝对 URL 基址(无尾部斜杠)。
回退链与 CSRF 的 trusted_origin 一致:APP_BASE_URL → Host 头(https 前缀) → 兜底 http://localhost 并告警。生产部署规范要求设置 APP_BASE_URL。
trusted_origin
APP_BASE_URL
Host
http://localhost