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

Consistency of limits on request body size #609

Open
matthew-white opened this issue Mar 13, 2024 · 0 comments
Open

Consistency of limits on request body size #609

matthew-white opened this issue Mar 13, 2024 · 0 comments
Labels
backend Requires a change to the API server frontend Requires a change to the UI ops Docker, ops to deploy Central

Comments

@matthew-white
Copy link
Member

matthew-white commented Mar 13, 2024

Our nginx config specifies a limit of 100 MB on the size of the request body. Frontend and Backend implement similar limits:

  • Before sending a file (e.g., a form attachment), Frontend checks that the file doesn't exceed 100 MB. If it does, then Frontend won't even attempt to send the file and will show an error message (old discussion: Uploading a large media file for draft form fails #178).
  • Backend rejects JSON requests whose body is more than 250 kB. The exception is creating entities in bulk, in which case a request body of up to 100 MB is accepted.

Today we discussed the possibility that a user might try to change the nginx config, but wouldn't know to change Frontend as well. The Frontend code mentions the nginx config in a comment, but the nginx config doesn't mention Frontend.

Probably the best way to ensure that everything is consistent is to have Docker pass the limit to nginx, Frontend, and probably also Backend. Maybe the limit could be passed as an env variable.

@matthew-white matthew-white added frontend Requires a change to the UI ops Docker, ops to deploy Central labels Mar 13, 2024
@matthew-white matthew-white added the backend Requires a change to the API server label Apr 13, 2024
@matthew-white matthew-white changed the title Consistency between nginx and Frontend limits on request body size Consistency of limits on request body size Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Requires a change to the API server frontend Requires a change to the UI ops Docker, ops to deploy Central
Projects
None yet
Development

No branches or pull requests

1 participant