Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

increase next body parser limit #259

Merged
merged 1 commit into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
module.exports = {
reactStrictMode: true,
serverActions: {
bodySizeLimit: '3mb'
}
}
7 changes: 7 additions & 0 deletions pages/api/v1/applicants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,12 @@ function parseSort(queryString: string | string[]): any {
// sort may not be stable, so sort by email as well
return { [field]: sort.order === 'ascend' ? 1 : -1, email: -1 };
}
export const config = {
api: {
bodyParser: {
sizeLimit: '3mb'
}
}
}

export default protect(handler);
8 changes: 8 additions & 0 deletions pages/api/v1/registration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,12 @@ const patchHandler: NextApiHandler = async (req, res) => {
return res.status(200).send(undefined);
};

export const config = {
api: {
bodyParser: {
sizeLimit: '3mb'
}
}
}

export default protect(registrationHandler);
Loading