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

Allow configuring JSON request body size limits #16

Merged
merged 2 commits into from
Nov 1, 2023

Conversation

alxndrsn
Copy link
Member

No description provided.

Copy link

@louwers louwers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alxndrsn
Copy link
Member Author

alxndrsn commented Oct 23, 2023

@louwers would it be less of a concern if this value was configurable, and defaulted to the current 1mb?

As a comparison, couchdb's default is 4GB: https://docs.couchdb.org/en/stable/config/http.html#chttpd/max_http_request_size

Because of this lib's use in the pouchdb test suite, the current limit means that pouchdb tests can't make requests larger than 1MB.

@louwers
Copy link

louwers commented Oct 23, 2023

Yes being configurable will help (keep the default low, allow people to override when they understand the security implications).

There is a whole discussion on the CouchDB side about this as well. I think it is even more of an attack vector for Node.js since it is single-threaded.

apache/couchdb#1253

Because of this lib's use in the pouchdb test suite, the current limit means that pouchdb tests can't make requests larger than 1MB.

Make sense!

@alxndrsn alxndrsn changed the title Increase JSON request size limits to 100MB Allow configuring JSON request body size limits Nov 1, 2023
@alxndrsn
Copy link
Member Author

alxndrsn commented Nov 1, 2023

@louwers thanks for the suggestions; PR updated

@alxndrsn alxndrsn merged commit 69e847a into pouchdb:master Nov 1, 2023
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.

None yet

2 participants