Skip to content

Commit

Permalink
chore: disable response size warning when serving files
Browse files Browse the repository at this point in the history
  • Loading branch information
sneko committed Mar 26, 2024
1 parent d79d925 commit e97dfaf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/pages/api/dataset/initiatives.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ const QueryParametersSchema = z.object({
format: z.literal('raw').optional(),
});

export const config = {
api: {
responseLimit: '50mb', // Only show a Next.js warning if the response is above 50 MB (currently around ~25 MB)
},
};

export async function handler(req: NextApiRequest, res: NextApiResponse) {
const { t } = getServerTranslation('common');

Expand Down

0 comments on commit e97dfaf

Please sign in to comment.