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

HOF-817 Bugfix Payload too large #460

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

TemitopeAyokuHO
Copy link

@TemitopeAyokuHO TemitopeAyokuHO commented Jul 23, 2024

##What
HOF-817 - Payload Too Large.

Why?

When user enters more than 1500 characters in any textbox that requires max length of 1500, validation error message is not triggered instead a payload too large error appears once click on save and continue button.

evidence-notes

How?

  • Body parser incoming request bodies in a middleware by default has a limit set to 100kb which is small for the request body sent over each form service. Every form service has a generic request body size, The aim is to enable each service to pass the required body size from project level .

  • Set the limit for both Json and urlencode as a parameter from the project level, the values will be declared the .env file of each project.

  • make a modification in the lib/setting.js and config/hof-default.js file

Testing?

  • Tested on ACRS Form and work fine

Screenshots (optional)

Screenshot 2024-07-22 at 16 35 44 Screenshot 2024-07-22 at 16 35 58

Anything Else? (optional)

Check list

  • I have reviewed my own pull request for linting issues (e.g. adding new lines)
  • I have written tests (if relevant) - not applicable
  • I have created a JIRA number for my branch
  • I have created a JIRA number for my commit
  • I have followed the chris beams method for my commit https://cbea.ms/git-commit/
    here is an example commit
  • Ensure drone builds are green especially tests
  • I will squash the commits before merging

TemitopeAyokuHO and others added 2 commits July 23, 2024 09:51
- Body parser incoming request bodies in a middleware by default has a limit set to 100kb which is small for the request body sent over the form.

- Set the limit for both Json and urlencode body size to 50mb.
- Body parser incoming request bodies in a middleware by default has a limit set to 100kb which is small for the request body sent over each form service. Every form service has a generic request body size, The aim is to enable each service to pass the required body size from project level .

- Set the limit for both Json and urlencode as a parameter from the project level, the values will be declared the .env file of each project.

- make a modification in the lib/setting.js  and config/hof-default.js file
@TemitopeAyokuHO TemitopeAyokuHO force-pushed the HOF-817-Bugfix-Payload-too-large branch from b05f5e4 to 02a3633 Compare July 24, 2024 12:47
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.

1 participant