Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Commit

Permalink
Merge pull request #178 from nervosnetwork/body-parser-limit
Browse files Browse the repository at this point in the history
fix: Body parser limit
  • Loading branch information
classicalliu authored Feb 19, 2022
2 parents a8bed18 + 100d6e7 commit 899b3b4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/api-server/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ if (NEW_RELIC_LICENSE_KEY) {

const app = express();

app.use(express.json());
const BODY_PARSER_LIMIT = "100mb";

app.use(express.json({ limit: BODY_PARSER_LIMIT }));

const sentryOptionRequest = [
"cookies",
Expand Down Expand Up @@ -52,7 +54,7 @@ const corsOptions = {

app.use(logger("dev"));
app.use(cors(corsOptions));
app.use(express.urlencoded({ extended: false }));
app.use(express.urlencoded({ extended: false, limit: BODY_PARSER_LIMIT }));

app.use(function (req, _res, next) {
if (NEW_RELIC_LICENSE_KEY) {
Expand Down

0 comments on commit 899b3b4

Please sign in to comment.