---
title: "Find blocked requests"
description: "Find what a WAF blocked in Observability, see which rule did it, and fix false positives."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Find blocked requests

1. Turn [logging](/waf/logging) on, if it isn't, with `scope` `matched` and an environment in the WAF's
   project:

   ```json
   "logging": { "scope": "matched", "environment": "production" }
   ```

2. Search the environment for the WAF's blocks:

   ```sh
   ezgh obs search --environment production --service ezgh.waf --from 1h --contains '"action":"block"'
   ```

   In the console, **Find blocked requests** on a WAF's **Logging** tab opens its logs in Observability.

3. Read a record's `terminatingRule` and `matchedRules`: they name the rule that blocked the request,
   with its set. Its `path`, `query`, `clientIp` and `userAgent` show what was sent and by whom.

To narrow it down, add `--matches` with a regular expression, such as `"path":"/checkout`, or another
filter of [`ezgh obs search`](/cli/reference/obs-search).

## A legitimate request was blocked

- **By a managed rule:** add a [rule override](/waf/managed-rule-sets#rule-overrides-for-false-positives)
  for its ID, `off` (or `log`, outside `ezgh/core`).
- **By a custom rule:** change its conditions, or add an `allow` rule above it for the request.
- **To check a change first:** set the set's or the WAF's `mode` to `log`. Records then show `action`
  `log` for what it would have blocked.

Source: https://docs.ezghcloud.com/waf/guides/find-blocked-requests/index.mdx
