File tree 1 file changed +6
-3
lines changed
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';
14
14
import { createLogger } from './internal/request-logger' ;
15
15
import { setRoutes } from './internal/route-cache' ;
16
16
import { getFunctionsAndAssets } from './internal/runtime-paths' ;
17
- import { functionToRoute , constructGlobalScope } from './route' ;
17
+ import { constructGlobalScope , functionToRoute } from './route' ;
18
18
19
19
const debug = getDebugFunction ( 'twilio-run:server' ) ;
20
20
const DEFAULT_PORT = process . env . PORT || 3000 ;
21
+ const DEFAULT_BODY_SIZE_LAMBDA = '6mb' ;
21
22
22
23
function requireUncached ( module : string ) : any {
23
24
delete require . cache [ require . resolve ( module ) ] ;
@@ -50,8 +51,10 @@ export async function createServer(
50
51
51
52
const app = express ( ) ;
52
53
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 } ) ) ;
55
58
app . get ( '/favicon.ico' , ( req , res ) => {
56
59
res . redirect (
57
60
'https://www.twilio.com/marketing/bundles/marketing/img/favicons/favicon.ico'
You can’t perform that action at this time.
0 commit comments