Skip to content

Commit af8acb3

Browse files
committed
fix: address deprecation warning on startup
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
1 parent c1c2611 commit af8acb3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/robot.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ class Robot {
444444
app.use(express.query())
445445

446446
app.use(express.json())
447-
app.use(express.urlencoded({ limit, parameterLimit: paramLimit }))
447+
app.use(express.urlencoded({ limit, parameterLimit: paramLimit, extended: false }))
448448
// replacement for deprecated express.multipart/connect.multipart
449449
// limit to 100mb, as per the old behavior
450450
app.use(multipart({ maxFilesSize: 100 * 1024 * 1024 }))

0 commit comments

Comments
 (0)