mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
fix: bigint解析失败导致500
This commit is contained in:
@@ -149,7 +149,7 @@ export function startExpress(port: number) {
|
|||||||
app.use(express.json({
|
app.use(express.json({
|
||||||
limit: '500mb',
|
limit: '500mb',
|
||||||
verify: (req: any, res: any, buf: any, encoding: any) => {
|
verify: (req: any, res: any, buf: any, encoding: any) => {
|
||||||
req.rawBody = buf
|
req.rawBody = buf;
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
app.use((req: any, res: any, next: any) => {
|
app.use((req: any, res: any, next: any) => {
|
||||||
@@ -157,7 +157,8 @@ export function startExpress(port: number) {
|
|||||||
req.body = JSONbig.parse(req.rawBody.toString());
|
req.body = JSONbig.parse(req.rawBody.toString());
|
||||||
next();
|
next();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
next(error);
|
// next(error);
|
||||||
|
next();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user