mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-22 20:23:49 +01:00
Revert "remove body parser settings for now"
This reverts commit 41ce22aa1c718dde7585609da2addd75985394a0.
This commit is contained in:
parent
5664405c3a
commit
fccf6f4de8
@ -40,7 +40,14 @@ app.use(async (ctx, next) => {
|
||||
app.use(formidable());
|
||||
|
||||
app.use(
|
||||
bodyParser(),
|
||||
bodyParser({
|
||||
// リクエストが multipart/form-data でない限りはJSONだと見なす
|
||||
detectJSON: (ctx) =>
|
||||
!(
|
||||
ctx.is("multipart/form-data") ||
|
||||
ctx.is("application/x-www-form-urlencoded")
|
||||
),
|
||||
}),
|
||||
);
|
||||
|
||||
// Init multer instance
|
||||
|
Loading…
Reference in New Issue
Block a user