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