> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.fabricgateway.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.fabricgateway.ai/_mcp/server.

# Deny All plugin

> Reference for the Deny All plugin, which refuses every request that it applies to.

The Deny All plugin refuses every request that it applies to, without calling the upstream. Use it to close a route, or combine it with match conditions to block specific paths, methods, or consumers. It runs after authentication, so a caller without a valid credential gets the authentication error first.

## Where it runs

|             |                   |
| ----------- | ----------------- |
| Protocols   | All               |
| Scope kinds | `global`, `route` |
| Phase       | Request           |

## Configuration

| Field    | Type   | Default          | Description                                                                                                                                                                                                      |
| -------- | ------ | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `reason` | string | `request denied` | The reason returned to the client. The console labels this **Reason**.                                                                                                                                           |
| `status` | number | `403`            | The HTTP status code, from 100 to 599. A `status` set in a YAML config file is ignored, and the response is `403`. Set it through the admin API. The console labels this **HTTP status**. Ignored on MCP routes. |

On MCP routes, the client gets HTTP `200` with a JSON-RPC error, code `-32003`, whose `message` is the reason. On every other route, the client gets the configured status with this body:

```json
{ "error": "forbidden", "reason": "request denied" }
```

## Example

```json
{
  "name": "close-legacy-route",
  "plugin_id": "deny-all",
  "scope": { "kind": "route", "name": "legacy-api" },
  "config": { "reason": "This route is retired. Use orders-v2.", "status": 410 }
}
```

## Related guides

* [Control traffic with plugins](/configure/plugins)