Skip to content

Commit

Permalink
Merge pull request #152 from trojs/feature/set-limit-to-5mb
Browse files Browse the repository at this point in the history
Set limit in json parser
  • Loading branch information
w3nl authored Oct 1, 2024
2 parents e76a2e4 + e387127 commit 83af169
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 23 deletions.
42 changes: 21 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@trojs/openapi-server",
"description": "OpenAPI Server",
"version": "2.0.1",
"version": "2.0.2",
"author": {
"name": "Pieter Wigboldus",
"url": "https://trojs.org/"
Expand Down
2 changes: 1 addition & 1 deletion src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export const setupServer = async ({
app.use(cors(corsOptions));
app.use(compression());
app.use(helmet(getOriginResourcePolicy(origin)));
app.use(express.json());
app.use(express.json({ limit: maximumBodySize }));
middleware.forEach((fn) => app.use(fn));
app.use(bodyParser.urlencoded({ extended: false, limit: maximumBodySize }));
app.use((_request, response, next) => {
Expand Down

0 comments on commit 83af169

Please sign in to comment.