File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -14,10 +14,11 @@ import { getDebugFunction } from '../utils/logger';
1414import { createLogger } from './internal/request-logger' ;
1515import { setRoutes } from './internal/route-cache' ;
1616import { getFunctionsAndAssets } from './internal/runtime-paths' ;
17- import { functionToRoute , constructGlobalScope } from './route' ;
17+ import { constructGlobalScope , functionToRoute } from './route' ;
1818
1919const debug = getDebugFunction ( 'twilio-run:server' ) ;
2020const DEFAULT_PORT = process . env . PORT || 3000 ;
21+ const DEFAULT_BODY_SIZE_LAMBDA = '6mb' ;
2122
2223function requireUncached ( module : string ) : any {
2324 delete require . cache [ require . resolve ( module ) ] ;
@@ -50,8 +51,10 @@ export async function createServer(
5051
5152 const app = express ( ) ;
5253 app . use ( userAgentMiddleware . express ( ) ) ;
53- app . use ( bodyParser . urlencoded ( { extended : false } ) ) ;
54- app . use ( bodyParser . json ( ) ) ;
54+ app . use (
55+ bodyParser . urlencoded ( { extended : false , limit : DEFAULT_BODY_SIZE_LAMBDA } )
56+ ) ;
57+ app . use ( bodyParser . json ( { limit : DEFAULT_BODY_SIZE_LAMBDA } ) ) ;
5558 app . get ( '/favicon.ico' , ( req , res ) => {
5659 res . redirect (
5760 'https://www.twilio.com/marketing/bundles/marketing/img/favicons/favicon.ico'
You can’t perform that action at this time.
0 commit comments