Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gabbifish opened this issue Aug 23, 2019 · 2 comments

Comments

@gabbifish
Copy link
Contributor

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

@geota
Copy link

geota commented Sep 9, 2019

@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.

@gabbifish
Copy link
Contributor Author

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

geota pushed a commit to geota/cloudflare-rs that referenced this issue Sep 12, 2019
add validation method to endpoint trait.
implement payload size validation for bulk write endpoint.
geota pushed a commit to geota/cloudflare-rs that referenced this issue Sep 12, 2019
add validation method to endpoint trait.
implement payload size validation for bulk write endpoint.
geota pushed a commit to geota/cloudflare-rs that referenced this issue Sep 12, 2019
add validation method to endpoint trait.
implement payload size validation for bulk write endpoint.
geota pushed a commit to geota/cloudflare-rs that referenced this issue Sep 12, 2019
add validation method to endpoint trait.
implement payload size validation for bulk write endpoint.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants