Skip to main content

admin_authorized

Function admin_authorized 

Source
pub fn admin_authorized(
    headers: &HeaderMap,
    admin_key: &Option<String>,
) -> Result<(), ApiError>
Expand description

Authorize an admin request from request headers against the configured admin key. Errors if no admin key is configured (admin endpoints are disabled) or the provided x-api-key / bearer does not match. Used by the /v1/admin endpoints.