Comparing version 0.15.6 to 0.15.7
@@ -8,2 +8,3 @@ import { SSM } from 'aws-sdk' | ||
origin?: string; | ||
origins?: string[]; | ||
headers?: string; | ||
@@ -10,0 +11,0 @@ credentials?: boolean; |
{ | ||
"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 @@ }) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
133633
3244