Skip to main content

handle_host_browser_bypass

Function handle_host_browser_bypass 

Source
pub(crate) async fn handle_host_browser_bypass(
    __arg0: State<AppState>,
    headers: HeaderMap,
    __arg2: Json<Value>,
) -> impl IntoResponse
Expand description

POST /api/v1/host/browser_bypass — the person’s Bypass button and End bypass, relayed by the CEF host (bypass spec §5). Only the host can call it: an agent holding the instance auth key gets 403, so no agent can grant itself a bypass. Body {block_id, on, minutes?, agent, origins}: agent and origins are what the confirmation showed; the grant is made only if they are still true.