lambda-request-handler
Advanced tools
Comparing version 0.2.3 to 0.3.0
@@ -53,3 +53,8 @@ "use strict"; | ||
ssl = true; | ||
remoteAddress = event.requestContext && event.requestContext.identity && event.requestContext.identity.sourceIp; | ||
const remoteAddressList = event.requestContext && event.requestContext.identity && event.requestContext.identity.sourceIp; | ||
if (remoteAddressList) { | ||
// HTTP API includes the full x-forwarder for chain here and the remote ip is the last element | ||
const items = remoteAddressList.split(',').map(s => s.trim()); | ||
remoteAddress = items[items.length - 1]; | ||
} | ||
} | ||
@@ -56,0 +61,0 @@ return { |
{ | ||
"name": "lambda-request-handler", | ||
"version": "0.2.3", | ||
"version": "0.3.0", | ||
"license": "(MIT OR Apache-2.0)", | ||
@@ -31,3 +31,4 @@ "scripts": { | ||
"alb", | ||
"application-load-balancer" | ||
"application-load-balancer", | ||
"http-api" | ||
], | ||
@@ -37,19 +38,19 @@ "main": "./dist/compile/lambda", | ||
"dependencies": { | ||
"in-process-request": "^0.0.7" | ||
"in-process-request": "^0.0.8" | ||
}, | ||
"devDependencies": { | ||
"@types/compression": "^0.0.36", | ||
"@types/cookie-parser": "^1.4.1", | ||
"@types/express": "^4.17.0", | ||
"@types/jest": "^24.0.15", | ||
"@types/node": "^12.0.8", | ||
"@types/compression": "^1.0.1", | ||
"@types/cookie-parser": "^1.4.2", | ||
"@types/express": "^4.17.2", | ||
"@types/jest": "^24.0.23", | ||
"@types/node": "^12.12.9", | ||
"compression": "^1.7.4", | ||
"cookie-parser": "^1.4.4", | ||
"ejs": "^2.6.2", | ||
"ejs": "^2.7.3", | ||
"express": "^4.17.1", | ||
"jest": "^24.8.0", | ||
"ts-jest": "^24.0.2", | ||
"ts-node": "^8.3.0", | ||
"typescript": "^3.5.2" | ||
"jest": "^24.9.0", | ||
"ts-jest": "^24.1.0", | ||
"ts-node": "^8.5.2", | ||
"typescript": "^3.7.2" | ||
} | ||
} |
# lambda-request-handler | ||
An npm module that allows your Node.js web applications to be deployed as an AWS Lambda function and invoked in response to API Gateway or Application Load Balancer requests. | ||
An npm module that allows your Node.js web applications to be deployed as an AWS Lambda function and invoked in response to API Gateway, HTTP API, or Application Load Balancer requests. | ||
@@ -16,3 +16,3 @@ [![Build Status](https://travis-ci.org/janaz/lambda-request-handler.svg?branch=master)](https://travis-ci.org/janaz/lambda-request-handler) | ||
It supports `nodejs8.10` and `nodejs10.x` execution environments. | ||
It supports `nodejs10.x` and `nodejs12.x` execution environments. | ||
@@ -19,0 +19,0 @@ The main differences between this module and `aws-serverless-express` are |
21204
265
+ Addedin-process-request@0.0.8(transitive)
- Removedin-process-request@0.0.7(transitive)
Updatedin-process-request@^0.0.8