Skip to content

Commit

Permalink
Merge branch 'master' into update-deps
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfy1339 committed Jul 23, 2024
2 parents d3bb208 + b47fbee commit 8f94a42
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
12 changes: 12 additions & 0 deletions lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,17 @@ module.exports = (testRoute) => {
app.use(require('express-sslify').HTTPS({ trustProtoHeader: true }))
}

app.use((req, res, next) => {
var buf = ''
req.on('data', (chunk) => {
buf += chunk
})
req.on('end', () => {
req.rawdata = buf
})
next()
})

app.use(cors())
app.use(express.json())
app.use(express.urlencoded({ extended: true }))
Expand Down Expand Up @@ -99,6 +110,7 @@ module.exports = (testRoute) => {
payload: {
...req.headers,
body: req.body,
rawdata: req.rawdata,
query: req.query,
timestamp: Date.now()
}
Expand Down
14 changes: 0 additions & 14 deletions package-lock.json

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

0 comments on commit 8f94a42

Please sign in to comment.