serverless-api-cloudfront
Advanced tools
Comparing version 0.9.4 to 0.9.5
@@ -71,2 +71,3 @@ const path = require('path'); | ||
this.prepareCompress(distributionConfig); | ||
this.prepareMinimumProtocolVersion(distributionConfig); | ||
} | ||
@@ -163,2 +164,10 @@ | ||
prepareMinimumProtocolVersion(distributionConfig) { | ||
const minimumProtocolVersion = this.getConfig('minimumProtocolVersion', undefined); | ||
if (minimumProtocolVersion) { | ||
distributionConfig.ViewerCertificate.MinimumProtocolVersion = minimumProtocolVersion; | ||
} | ||
} | ||
getConfig(field, defaultValue) { | ||
@@ -165,0 +174,0 @@ return _.get(this.serverless, `service.custom.apiCloudFront.${field}`, defaultValue) |
{ | ||
"name": "serverless-api-cloudfront", | ||
"version": "0.9.4", | ||
"version": "0.9.5", | ||
"engines": { | ||
"node": ">=4.0" | ||
"node": ">=6.4" | ||
}, | ||
@@ -28,6 +28,6 @@ "description": "CloudFront distribution in front of your API Gateway", | ||
"dependencies": { | ||
"chalk": "^2.0.0", | ||
"js-yaml": "^3.10.0", | ||
"lodash": "^4.13.1" | ||
"chalk": "2.4.2", | ||
"js-yaml": "3.12.1", | ||
"lodash": "4.17.11" | ||
} | ||
} |
@@ -59,2 +59,4 @@ # serverless-api-cloudfront | ||
- per_page | ||
priceClass: PriceClass_100 | ||
minimumProtocolVersion: TLSv1 | ||
``` | ||
@@ -79,3 +81,3 @@ | ||
* `headers` can be *all*, *none* (default) or a list: | ||
* [`headers`][headers-default-cache] can be *all*, *none* (default) or a list of headers ([see CloudFront custom behaviour][headers-list]): | ||
@@ -86,2 +88,5 @@ ``` | ||
[headers-default-cache]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-defaultcachebehavior.html#cfn-cloudfront-distribution-defaultcachebehavior-forwardedvalues | ||
[headers-list]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/RequestAndResponseBehaviorCustomOrigin.html#request-custom-headers-behavior | ||
* `querystring` can be *all* (default), *none* or a list, in which case all querystring parameters are forwarded, but cache is based on the list: | ||
@@ -92,1 +97,19 @@ | ||
``` | ||
* [`priceClass`][price-class] can be `PriceClass_All` (default), `PriceClass_100` or `PriceClass_200`: | ||
``` | ||
priceClass: PriceClass_All | ||
``` | ||
[price-class]: https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_GetDistributionConfig.html#cloudfront-GetDistributionConfig-response-PriceClass | ||
* [`minimumProtocolVersion`][minimum-protocol-version] can be `TLSv1` (default), `TLSv1_2016`, `TLSv1.1_2016`, `TLSv1.2_2018` or `SSLv3`: | ||
``` | ||
minimumProtocolVersion: TLSv1 | ||
``` | ||
[minimum-protocol-version]: https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_ViewerCertificate.html#cloudfront-Type-ViewerCertificate-MinimumProtocolVersion |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
13560
6
140
112
1
+ Addedjs-yaml@3.12.1(transitive)
+ Addedlodash@4.17.11(transitive)
- Removedjs-yaml@3.14.1(transitive)
- Removedlodash@4.17.21(transitive)
Updatedchalk@2.4.2
Updatedjs-yaml@3.12.1
Updatedlodash@4.17.11