Skip to content

Commit 441ef39

Browse files
authored
Update index.js
Make body more beauty
1 parent 5c77bf2 commit 441ef39

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ app.all('*', (req, res) => {
2323
path: req.path,
2424
headers: req.headers,
2525
method: req.method,
26-
body: req.body,
26+
body: JSON.parse(req.body === "" ? "{}" : req.body),
2727
cookies: req.cookies,
2828
fresh: req.fresh,
2929
hostname: req.hostname,

0 commit comments

Comments
 (0)