File tree Expand file tree Collapse file tree 3 files changed +7
-1
lines changed
Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ function initApp(options) {
124124 // enable compression
125125 app . use ( compression ( { level : app . conf . compression_level } ) ) ;
126126 // use the JSON body parser
127- app . use ( bodyParser . json ( ) ) ;
127+ app . use ( bodyParser . json ( { limit : app . conf . max_body_size || '100kb' } ) ) ;
128128 // use the application/x-www-form-urlencoded parser
129129 app . use ( bodyParser . urlencoded ( { extended : true } ) ) ;
130130
Original file line number Diff line number Diff line change @@ -62,6 +62,9 @@ services:
6262 # the user agent to use when issuing requests
6363 # user_agent: service-template-node
6464 # the template used for contacting the MW API
65+ #
66+ # # Max JSON POST body size limit.
67+ # max_body_size: 100kb
6568 mwapi_req :
6669 method : post
6770 uri : https://{{domain}}/w/api.php
Original file line number Diff line number Diff line change @@ -62,6 +62,9 @@ services:
6262 # the user agent to use when issuing requests
6363 # user_agent: service-template-node
6464 # the template used for contacting the MW API
65+ #
66+ # Max JSON POST body size limit.
67+ # max_body_size: 100kb
6568 mwapi_req :
6669 method : post
6770 uri : http://api.svc.eqiad.wmnet/w/api.php
You can’t perform that action at this time.
0 commit comments