Skip to content

Commit

Permalink
feat: Allowed 20mb payload size for /v1/template/:templateId/sample…
Browse files Browse the repository at this point in the history
… r… (#369)

…oute
  • Loading branch information
chavda-bhavik authored Sep 19, 2023
2 parents 87f1d26 + 3abef4e commit b965161
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/api/src/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ if (process.env.SENTRY_DSN) {
// Validate the ENV variables after launching SENTRY, so missing variables will report to sentry
validateEnv();

const extendedBodySizeRoutes = ['/v1/template/:templateId/sample'];

export async function bootstrap(expressApp?): Promise<INestApplication> {
let app;
if (expressApp) {
Expand All @@ -53,6 +55,8 @@ export async function bootstrap(expressApp?): Promise<INestApplication> {
);

app.use(cookieParser());
app.use(extendedBodySizeRoutes, bodyParser.json({ limit: '20mb' }));
app.use(extendedBodySizeRoutes, bodyParser.urlencoded({ limit: '20mb', extended: true }));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));

Expand Down

0 comments on commit b965161

Please sign in to comment.