Skip to content

Commit 9bfd2e1

Browse files
fysntianyugasun
authored andcommitted
Update index.js
Add protocol support so we can detect a request is using http or https
1 parent 07b9a2a commit 9bfd2e1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ function mapApiGatewayEventToHttpRequest (event, context, socketPath) {
3737

3838
return {
3939
method: event.httpMethod,
40+
protocol: headers['x-api-scheme'] || 'http',
4041
path: getPathWithQueryStringParams(event),
4142
headers,
4243
socketPath

0 commit comments

Comments
 (0)