File tree 1 file changed +5
-0
lines changed 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ const http = require('http')
6
6
const config = require ( 'config' )
7
7
8
8
const app = require ( 'connect' ) ( )
9
+ const bodyParser = require ( 'body-parser' )
9
10
const swaggerTools = require ( 'swagger-tools' )
10
11
const jsyaml = require ( 'js-yaml' )
11
12
@@ -26,6 +27,10 @@ const options = {
26
27
const spec = fs . readFileSync ( path . join ( __dirname , 'api/swagger.yaml' ) , 'utf8' )
27
28
const swaggerDoc = jsyaml . safeLoad ( spec )
28
29
30
+ // Extending payload size
31
+ app . use ( bodyParser . json ( { limit : '10mb' , extended : true } ) )
32
+ app . use ( bodyParser . urlencoded ( { limit : '10mb' , extended : true } ) )
33
+
29
34
// Initialize the Swagger middleware
30
35
swaggerTools . initializeMiddleware ( swaggerDoc , function ( middleware ) {
31
36
// Interpret Swagger resources and attach metadata to request - must be first in swagger-tools middleware chain
You can’t perform that action at this time.
0 commit comments