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

Increase payload size, add default express error handler #152

Merged
merged 1 commit into from
Dec 6, 2023

Conversation

Siegrift
Copy link
Collaborator

@Siegrift Siegrift commented Dec 1, 2023

Closes #151

Rationale

I've set the maximum payload limit to 10mb which should be more then enough for practical use cases. The higher the limit is the bigger is the risk of Signed API being spammed by attackers. We have Airnode allowlist in the config, but even processing such huge payloads incurs some overhead.

I've also added an e2e test that validates this.

@Siegrift Siegrift self-assigned this Dec 1, 2023
@Siegrift Siegrift requested a review from andreogle December 1, 2023 13:46
@bbenligiray
Copy link
Member

For reference, we'll push batches of 100 https://api3workspace.slack.com/archives/C01UR36T91V/p1701440527097619

@Siegrift
Copy link
Collaborator Author

Siegrift commented Dec 1, 2023

Thanks. For full context the signed data is roughly ~400 bytes, so for 100kb we could do 100000 / 400 = 250, with 10mb we can do 10000000 / 400 = 25000. I think 1mb would also suffice for practical purposes, but I'd leave it set to 10mb.

@andreogle
Copy link
Member

Would you be able to update this branch to make it a bit easier to review please?

Base automatically changed from log-style to main December 4, 2023 12:48
@Siegrift Siegrift merged commit b1e8d27 into main Dec 6, 2023
4 checks passed
@Siegrift Siegrift deleted the payload-limit branch December 6, 2023 15:34
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

Successfully merging this pull request may close these issues.

Fix "PayloadTooLargeError: request entity too large"
3 participants