fix(api-gateway): remove the verify body function
This commit is contained in:
parent
c19de13cac
commit
3ddd671c47
1 changed files with 1 additions and 14 deletions
|
@ -73,20 +73,7 @@ void container.load().then((container) => {
|
|||
}),
|
||||
)
|
||||
|
||||
app.use(
|
||||
json({
|
||||
limit: '50mb',
|
||||
verify: (_req: IncomingMessage, _res: ServerResponse, buf: Buffer, encoding: string): void => {
|
||||
try {
|
||||
if (buf && buf.length > 0) {
|
||||
JSON.parse(buf.toString(encoding as BufferEncoding | 'utf8'))
|
||||
}
|
||||
} catch (error) {
|
||||
logger.error(`Invalid JSON: ${(error as Error).message}. Request body: ${buf.toString()}`)
|
||||
}
|
||||
},
|
||||
}),
|
||||
)
|
||||
app.use(json({ limit: '50mb' }))
|
||||
app.use(
|
||||
text({
|
||||
type: ['text/plain', 'application/x-www-form-urlencoded', 'application/x-www-form-urlencoded; charset=utf-8'],
|
||||
|
|
Loading…
Reference in a new issue