Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aws-lambda-fastify

Package Overview
Dependencies
Maintainers
2
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aws-lambda-fastify - npm Package Compare versions

Comparing version 2.1.1 to 2.1.2

1

index.d.ts

@@ -17,2 +17,3 @@ import { Context } from "aws-lambda";

isBase64Encoded: boolean;
cookies?: string[]
}

@@ -19,0 +20,0 @@

@@ -93,8 +93,9 @@ module.exports = (app, options) => {

let multiValueHeaders
let cookies
Object.keys(res.headers).forEach((h) => {
const isSetCookie = h.toLowerCase() === 'set-cookie'
if (Array.isArray(res.headers[h])) {
if (h.toLowerCase() === 'set-cookie') {
if (isSetCookie) {
multiValueHeaders = multiValueHeaders || {}
multiValueHeaders[h] = res.headers[h]
delete res.headers[h]
} else res.headers[h] = res.headers[h].join(',')

@@ -105,2 +106,6 @@ } else if (typeof res.headers[h] !== 'undefined' && typeof res.headers[h] !== 'string') {

}
if (isSetCookie) {
cookies = Array.isArray(res.headers[h]) ? res.headers[h] : [res.headers[h]]
delete res.headers[h]
}
})

@@ -117,2 +122,4 @@

}
if (cookies) ret.cookies = cookies
if (multiValueHeaders) ret.multiValueHeaders = multiValueHeaders

@@ -119,0 +126,0 @@ resolve(ret)

8

package.json

@@ -29,3 +29,3 @@ {

"license": "MIT",
"version": "2.1.1",
"version": "2.1.2",
"main": "index.js",

@@ -43,3 +43,3 @@ "scripts": {

"benchmark": "^2.1.4",
"eslint": "^8.10.0",
"eslint": "^8.11.0",
"eslint-config-standard": "^16.0.3",

@@ -50,7 +50,7 @@ "eslint-plugin-import": "^2.25.4",

"eslint-plugin-standard": "^5.0.0",
"fastify": "^3.27.3",
"fastify": "^3.27.4",
"serverless-http": "^2.7.0",
"tap": "^16.0.0",
"tap": "^16.0.1",
"tsd": "^0.19.1"
}
}

@@ -10,3 +10,3 @@ # Introduction

**No use of internal sockets, makes use of Fastify's [inject](https://www.fastify.io/docs/latest/Testing/#testing-with-http-injection) function.**
**No use of internal sockets, makes use of Fastify's [inject](https://www.fastify.io/docs/latest/Guides/Testing/#testing-with-http-injection) function.**

@@ -13,0 +13,0 @@ **Seems [faster](https://github.com/fastify/aws-lambda-fastify#some-basic-performance-metrics)** *(as the name implies)* **than [aws-serverless-express](https://github.com/awslabs/aws-serverless-express) and [aws-serverless-fastify](https://github.com/benMain/aws-serverless-fastify) 😉**

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