Skip to main content

tenant_scope

Function tenant_scope 

Source
pub async fn tenant_scope(req: Request, next: Next) -> Response
Expand description

Middleware that resolves the tenant from X-TensorWasm-Tenant and stores it in the request’s axum::http::Extensions for handlers to pick up via Extension<TenantId>. On parse failure / required-but-missing, emits the standard error envelope and short-circuits the chain.