Vue Storefront is now Alokai! Learn More
Limit request body size

Limit request body size

The documentation only applies to instances deployed on Alokai@Edge.

This feature allows you to define maximum request body sizes for specific endpoints. It helps protect your backend from oversized requests that may cause performance or stability issues.

Configuration

Default and custom limits

  • By default, each endpoint has a 4 MB body size limit.
  • Custom limits are defined in kilobytes (KB).
  • Allowed values range from 8 KB (minimum) up to 32 MB (maximum).

Steps

  • Add a new entry with an exact URL path.
  • Enter only the path segment, starting with /. Do not include the protocol or domain name.
  • Set the limit in kilobytes (KB). Allowed values are between 8 KB and 32768 KB (32 MB).
  • Save the entry. The new limit applies immediately.
  • Entries are active right away; nothing else needs to be enabled.
  • You can edit or delete existing entries at any time.

Important

  • Wildcards are not supported – limits must be set per exact path.

Notes

  • Use lower limits (e.g., 8–64 KB) for endpoints that should only receive lightweight payloads (like form submissions).
  • Higher limits (several MB) should be reserved for endpoints that explicitly handle larger uploads.
  • Keep in mind that large request bodies can impact performance and increase the risk of abuse if not restricted properly.
  • The path config option is immutable. Once it is set, it can't be changed; to override, create a new entry and remove the old one.
  • Name length limit: each name must be between 2 and 256 characters.

Examples

Correct usage

  • Path: /upload/image

Incorrect usage

  • Path with domain: https://example.com/upload/image
  • Path with wildcard: /api/*