Source Events ↗

request.blocked

Probe protection blocked a request.

When
Before a blocked client request is rejected.
Payload
JSON: { request_id, client_ip, method, path, query }.
Cancelable
No

Fires when an IP is already blocked by probe protection.

Use cases

  • Security alerts
  • Blocklist observability

Example

Registration and handler

Register

hook!(host, PluginEvent::RequestBlocked, on_request_blocked);

Handler

extern "C" fn on_event(ctx: *const EventContext) -> HookResult {
    let ctx = unsafe { &*ctx };
    let payload = unsafe { std::slice::from_raw_parts(ctx.payload_ptr, ctx.payload_len) };
    let _json = std::str::from_utf8(payload).unwrap_or_default();
    HookResult::r#continue()
}

← All lifecycle events