Skip to content

Commit

Permalink
fix: address deprecation warning on startup
Browse files Browse the repository at this point in the history
The `body-parser` deprecation warning on startup is due to `express.urlencode()`
requiring an `extended` property in the options argument in Express 4.x.

Fixes: #1476
  • Loading branch information
Trott committed Mar 12, 2019
1 parent c1c2611 commit af8acb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/robot.js
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ class Robot {
app.use(express.query())

app.use(express.json())
app.use(express.urlencoded({ limit, parameterLimit: paramLimit }))
app.use(express.urlencoded({ limit, parameterLimit: paramLimit, extended: false }))
// replacement for deprecated express.multipart/connect.multipart
// limit to 100mb, as per the old behavior
app.use(multipart({ maxFilesSize: 100 * 1024 * 1024 }))
Expand Down

2 comments on commit af8acb3

@Dark403969
Copy link

Choose a reason for hiding this comment

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

@Dark403969
Copy link

Choose a reason for hiding this comment

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

Please sign in to comment.