cloudflare-rs icon indicating copy to clipboard operation
cloudflare-rs copied to clipboard

After serialization of request payload bytes, verify payload size is <100MB

Open gabbifish opened this issue 5 years ago • 2 comments

There are certain API endpoints on the Cloudflare API that allow users to send large payloads (e.g. the Workers KV bulk upload endpoint).

The API gateway will block any payloads over 100MB in size: this means we get an APIFailure like Error(413, ApiErrors { other: {}, errors: [] }). I think it could be worth introducing a general request validator function that checks for things like appropriate payload size, given that this will affect all API requests.

cc @ashleymichal

gabbifish avatar Aug 23 '19 21:08 gabbifish

@gabbifish I am trying to learn rust. Would you all accept a PR for this issue? Wanted to confirm before I spent time on it.

geota avatar Sep 09 '19 15:09 geota

@geota Go for it!! I'd be happy to provide PR review :)

gabbifish avatar Sep 09 '19 17:09 gabbifish