Skip to content

Commit 2ee391e

Browse files
committed
lazy loading http-lambda-proxy dependency
1 parent 3e67d7c commit 2ee391e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/proxy-factory.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
'use strict'
22
const fastProxy = require('fast-proxy')
3+
const lambdaProxy = require('http-lambda-proxy')
34

45
module.exports = ({ proxyType, opts, route }) => {
56
let proxy
@@ -10,7 +11,7 @@ module.exports = ({ proxyType, opts, route }) => {
1011
...(opts.fastProxy)
1112
}).proxy
1213
} else if (proxyType === 'lambda') {
13-
proxy = require('http-lambda-proxy')({
14+
proxy = lambdaProxy({
1415
target: opts.targetOverride || route.target,
1516
...(route.lambdaProxy || {
1617
region: 'eu-central-1'

0 commit comments

Comments
 (0)