Skip to content

Scheduling infrastructure for absolutely everyone.

fix: add arrayLimit (#26542)

Udit Takkar0d905a6c11ff
diff --git a/apps/api/v2/src/main.ts b/apps/api/v2/src/main.ts
index e7f51f7a157..4e12fd4b8eb 100644
--- a/apps/api/v2/src/main.ts
+++ b/apps/api/v2/src/main.ts
@@ -5,6 +5,7 @@ import { NestFactory } from "@nestjs/core";
import type { NestExpressApplication } from "@nestjs/platform-express";
import "dotenv/config";
import { WinstonModule } from "nest-winston";
+import * as qs from "qs";
import { bootstrap } from "./app";
import { AppModule } from "./app.module";
@@ -35,8 +36,12 @@ async function run() {
}
export async function createNestApp() {
- return NestFactory.create<NestExpressApplication>(AppModule, {
+ const app = await NestFactory.create<NestExpressApplication>(AppModule, {
logger: WinstonModule.createLogger(loggerConfig()),
bodyParser: false,
});
+
+ app.set("query parser", (str: string) => qs.parse(str, { arrayLimit: 1000 }));
+
+ return app;
}