claudia-api-builder
Advanced tools
Comparing version 3.0.1 to 3.0.2
{ | ||
"name": "claudia-api-builder", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "Simplify AWS ApiGateway handling", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -185,7 +185,10 @@ const util = require('util'), | ||
.then(corsOrigin => { | ||
if (!corsOrigin) { | ||
return {}; | ||
}; | ||
return { | ||
'Access-Control-Allow-Origin': corsOrigin, | ||
'Access-Control-Allow-Headers': corsOrigin && (customCorsHeaders || 'Content-Type,Authorization,X-Amz-Date,X-Api-Key,X-Amz-Security-Token'), | ||
'Access-Control-Allow-Methods': corsOrigin && methods.sort().join(',') + ',OPTIONS', | ||
'Access-Control-Allow-Credentials': corsOrigin && 'true', | ||
'Access-Control-Allow-Headers': (customCorsHeaders || 'Content-Type,Authorization,X-Amz-Date,X-Api-Key,X-Amz-Security-Token'), | ||
'Access-Control-Allow-Methods': methods.sort().join(',') + ',OPTIONS', | ||
'Access-Control-Allow-Credentials': 'true', | ||
'Access-Control-Max-Age': customCorsMaxAge || 0 | ||
@@ -192,0 +195,0 @@ }; |
29764
640