Tyk v2.2 Documentation Components

  1. Home
  2. Tyk v2.2 Documentation Components
  3. Max Request Size: With API Definition

Max Request Size: With API Definition

To set up this middleware in your API Definition, simply add a new section to the extended_paths block of your API Definition configuration called size_limits:

"size_limits": [
      "path": "widget/{id}",
      "method": "PUT",
      "size_limit": 25

The size limit must be in in bytes.

Global size limiting

To add a global check for size limits, simply add:

`"global_size_limit": 500` 

To the version element of your API Definition, the global size limit will be checked before the specific path-based one.