Skip to content

Commit

Permalink
http-cors: expose getOrigin in options (middyjs#385)
Browse files Browse the repository at this point in the history
* feat: exposes http-cors getOrigin to options

* Version bump
  • Loading branch information
thejuan authored and benjifs committed May 21, 2020
1 parent bc2a697 commit a7b84e1
Show file tree
Hide file tree
Showing 40 changed files with 155 additions and 124 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"packages": [
"packages/*"
],
"version": "1.0.0-alpha.36"
"version": "1.0.0-alpha.37"
}
136 changes: 58 additions & 78 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "middy-monorepo",
"version": "1.0.0-alpha.36",
"version": "1.0.0-alpha.37",
"description": "🛵 The stylish Node.js middleware engine for AWS Lambda",
"engines": {
"node": ">=6.10"
Expand Down
2 changes: 1 addition & 1 deletion packages/cache/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@middy/cache",
"version": "1.0.0-alpha.36",
"version": "1.0.0-alpha.37",
"description": "Cache middleware for the middy framework",
"engines": {
"node": ">=6.10"
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@middy/core",
"version": "1.0.0-alpha.36",
"version": "1.0.0-alpha.37",
"description": "🛵 The stylish Node.js middleware engine for AWS Lambda (core package)",
"engines": {
"node": ">=6.10"
Expand Down
2 changes: 1 addition & 1 deletion packages/do-not-wait-for-empty-event-loop/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@middy/do-not-wait-for-empty-event-loop",
"version": "1.0.0-alpha.36",
"version": "1.0.0-alpha.37",
"description": "Middleware for the middy framework that allows to easily disable the wait for empty event loop in a Lambda function",
"engines": {
"node": ">=6.10"
Expand Down
2 changes: 1 addition & 1 deletion packages/error-logger/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/error-logger/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@middy/error-logger",
"version": "1.0.0-alpha.36",
"version": "1.0.0-alpha.37",
"description": "Input and output logger middleware for the middy framework",
"engines": {
"node": ">=6.10"
Expand Down
2 changes: 1 addition & 1 deletion packages/function-shield/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/function-shield/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@middy/function-shield",
"version": "1.0.0-alpha.36",
"version": "1.0.0-alpha.37",
"description": "Hardens AWS Lambda execution environment",
"engines": {
"node": ">=6.10"
Expand Down
2 changes: 1 addition & 1 deletion packages/http-content-negotiation/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/http-content-negotiation/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@middy/http-content-negotiation",
"version": "1.0.0-alpha.36",
"version": "1.0.0-alpha.37",
"description": "Http content negotiation middleware for the middy framework",
"engines": {
"node": ">=6.10"
Expand Down
1 change: 1 addition & 0 deletions packages/http-cors/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ npm install --save @middy/http-cors

## Options

- `getOrigin` (function(incomingOrigin:string, options)) (optional): take full control of the generating the returned origin. Defaults to using the origin or origins option.
- `origin` (string) (optional): origin to put in the header (default: "`*`")
- `origins` (array) (optional): An array of allowed origins. The incoming origin is matched against the list and is returned if present.
- `headers` (string) (optional): value to put in Access-Control-Allow-Headers (default: `null`)
Expand Down
Loading

0 comments on commit a7b84e1

Please sign in to comment.