Socket
Socket
Sign inDemoInstall

middy

Package Overview
Dependencies
Maintainers
8
Versions
147
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

middy - npm Package Compare versions

Comparing version 0.15.6 to 0.15.7

1

middlewares.d.ts

@@ -8,2 +8,3 @@ import { SSM } from 'aws-sdk'

origin?: string;
origins?: string[];
headers?: string;

@@ -10,0 +11,0 @@ credentials?: boolean;

2

package.json
{
"name": "middy",
"version": "0.15.6",
"version": "0.15.7",
"description": "🛵 The stylish Node.js middleware engine for AWS Lambda",

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

@@ -11,23 +11,27 @@ import middy from '../../../';

it ('has an optional origin field', () => {
it('can set the origin field', () => {
const handler = middy(jest.fn());
handler.use(cors({
headers: "test-case",
credentials: true,
origin: '*',
}));
})
it('has an optional headers field', () => {
it('can set the origins field', () => {
const handler = middy(jest.fn());
handler.use(cors({
origin: 'example.com',
credentials: true,
origins: ['example.com', 'example2.com'],
}))
})
it('can set the headers field', () => {
const handler = middy(jest.fn());
handler.use(cors({
headers: 'test-case',
}));
})
it('has an optional credentials field', () => {
it('can set the credentials field', () => {
const handler = middy(jest.fn());
handler.use(cors({
origin: 'example.com',
headers: "test-case",
credentials: true,
}));

@@ -34,0 +38,0 @@ })

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