New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

lambda-router

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lambda-router - npm Package Compare versions

Comparing version 2.8.0 to 2.9.0

4

CHANGELOG.md

@@ -7,2 +7,6 @@ # Change Log / Release Notes

## [2.9.0] - 2019-08-16
### Added
- `normalizeHeaders` options to lower-case all header names
## [2.8.0] - 2019-07-02

@@ -9,0 +13,0 @@ ### Added

2

package.json
{
"name": "lambda-router",
"version": "2.8.0",
"version": "2.9.0",
"description": "A router to simplify AWS Lambda Functions.",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -53,3 +53,4 @@ # Lambda Router

parseBody = true, // parse JSON or URL encoded body into event
decodeEvent = true // merge URI decoded parameters for path and querystring
decodeEvent = true, // merge URI decoded parameters for path and querystring
normalizeHeaders = false // If true all headers will be lowercased, and the original headers will be placed on event.rawHeaders
} = {}) {

@@ -56,0 +57,0 @@ route: async (event, context) => Promise<{

@@ -27,3 +27,6 @@ 'use strict'

assumeJson = false,
decodeEvent = true
decodeEvent = true,
// default to false, otherwise adding this would be a breaking change
// TODO: v3, default true
normalizeHeaders = false
} = {}) {

@@ -115,2 +118,11 @@ const originalLogger = logger

// HTTP/2 says headers all always lowercase
if (normalizeHeaders) {
event.rawHeaders = event.headers
event.headers = Object.keys(event.headers).reduce((headers, name) => {
headers[name.toLowerCase()] = event.headers[name]
return headers
}, {})
}
// Route

@@ -117,0 +129,0 @@ if (includeTraceId) context.traceId = headers['X-Correlation-Id'] = getTraceId(event, context)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc