@gradientedge/cdk-utils 6.1.0 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -75,8 +75,9 @@ export declare class CloudFrontManager {
|
|
|
75
75
|
* @param {s3.IBucket?} logBucket
|
|
76
76
|
* @param {acm.ICertificate?} certificate
|
|
77
77
|
* @param {cloudfront.FunctionAssociation?} defaultFunctionAssociations
|
|
78
|
+
* @param {cloudfront.IResponseHeadersPolicy?} responseHeadersPolicy
|
|
78
79
|
*/
|
|
79
|
-
createDistributionWithHttpOrigin(id: string, scope: common.CommonConstruct, props: types.DistributionProps, origin: origins.HttpOrigin, domainNames: string[], logBucket?: s3.IBucket, certificate?: acm.ICertificate, defaultFunctionAssociations?: cloudfront.FunctionAssociation[]): cdk.aws_cloudfront.Distribution;
|
|
80
|
+
createDistributionWithHttpOrigin(id: string, scope: common.CommonConstruct, props: types.DistributionProps, origin: origins.HttpOrigin, domainNames: string[], logBucket?: s3.IBucket, certificate?: acm.ICertificate, defaultFunctionAssociations?: cloudfront.FunctionAssociation[], responseHeadersPolicy?: cloudfront.IResponseHeadersPolicy): cdk.aws_cloudfront.Distribution;
|
|
80
81
|
/**
|
|
81
82
|
* @summary Method to provision a Lambda@Edge function
|
|
82
83
|
*
|
|
@@ -173,8 +173,9 @@ class CloudFrontManager {
|
|
|
173
173
|
* @param {s3.IBucket?} logBucket
|
|
174
174
|
* @param {acm.ICertificate?} certificate
|
|
175
175
|
* @param {cloudfront.FunctionAssociation?} defaultFunctionAssociations
|
|
176
|
+
* @param {cloudfront.IResponseHeadersPolicy?} responseHeadersPolicy
|
|
176
177
|
*/
|
|
177
|
-
createDistributionWithHttpOrigin(id, scope, props, origin, domainNames, logBucket, certificate, defaultFunctionAssociations) {
|
|
178
|
+
createDistributionWithHttpOrigin(id, scope, props, origin, domainNames, logBucket, certificate, defaultFunctionAssociations, responseHeadersPolicy) {
|
|
178
179
|
const distribution = new cloudfront.Distribution(scope, `${id}`, {
|
|
179
180
|
certificate: certificate,
|
|
180
181
|
comment: `${id} - ${scope.props.stage} stage`,
|
|
@@ -184,6 +185,7 @@ class CloudFrontManager {
|
|
|
184
185
|
originRequestPolicy: props.defaultBehavior ? props.defaultBehavior.originRequestPolicy : undefined,
|
|
185
186
|
functionAssociations: defaultFunctionAssociations ?? undefined,
|
|
186
187
|
viewerProtocolPolicy: props.defaultBehavior ? props.defaultBehavior.viewerProtocolPolicy : undefined,
|
|
188
|
+
responseHeadersPolicy: responseHeadersPolicy ?? undefined,
|
|
187
189
|
},
|
|
188
190
|
additionalBehaviors: props.additionalBehaviors,
|
|
189
191
|
defaultRootObject: props.defaultRootObject,
|
package/package.json
CHANGED
|
@@ -180,6 +180,7 @@ export class CloudFrontManager {
|
|
|
180
180
|
* @param {s3.IBucket?} logBucket
|
|
181
181
|
* @param {acm.ICertificate?} certificate
|
|
182
182
|
* @param {cloudfront.FunctionAssociation?} defaultFunctionAssociations
|
|
183
|
+
* @param {cloudfront.IResponseHeadersPolicy?} responseHeadersPolicy
|
|
183
184
|
*/
|
|
184
185
|
public createDistributionWithHttpOrigin(
|
|
185
186
|
id: string,
|
|
@@ -189,7 +190,8 @@ export class CloudFrontManager {
|
|
|
189
190
|
domainNames: string[],
|
|
190
191
|
logBucket?: s3.IBucket,
|
|
191
192
|
certificate?: acm.ICertificate,
|
|
192
|
-
defaultFunctionAssociations?: cloudfront.FunctionAssociation[]
|
|
193
|
+
defaultFunctionAssociations?: cloudfront.FunctionAssociation[],
|
|
194
|
+
responseHeadersPolicy?: cloudfront.IResponseHeadersPolicy
|
|
193
195
|
) {
|
|
194
196
|
const distribution = new cloudfront.Distribution(scope, `${id}`, {
|
|
195
197
|
certificate: certificate,
|
|
@@ -200,6 +202,7 @@ export class CloudFrontManager {
|
|
|
200
202
|
originRequestPolicy: props.defaultBehavior ? props.defaultBehavior.originRequestPolicy : undefined,
|
|
201
203
|
functionAssociations: defaultFunctionAssociations ?? undefined,
|
|
202
204
|
viewerProtocolPolicy: props.defaultBehavior ? props.defaultBehavior.viewerProtocolPolicy : undefined,
|
|
205
|
+
responseHeadersPolicy: responseHeadersPolicy ?? undefined,
|
|
203
206
|
},
|
|
204
207
|
additionalBehaviors: props.additionalBehaviors,
|
|
205
208
|
defaultRootObject: props.defaultRootObject,
|