Skip to main content

router_with_auth

Function router_with_auth 

Source
pub fn router_with_auth(app: App, auth: Arc<Auth>) -> Router
Expand description

带登录保护的 router。

⚠ 中间件是全局的,不是只挡管理台页面 —— 真正危险的是它调的那些接口 (abort 能中止在途事务、retry 能改调度、submit 能凭空造事务)。 白名单只有 /health(反代健康检查)和 /login /logout