quidproquo-deploy-awscdk 0.0.92 → 0.0.93
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.
|
@@ -185,18 +185,23 @@ class QpqWebserverWebEntryConstruct extends QpqConstructBlock_1.QpqConstructBloc
|
|
|
185
185
|
if (seo.deprecated) {
|
|
186
186
|
continue;
|
|
187
187
|
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
188
|
+
// TODO: Find a better solution for this.
|
|
189
|
+
// Removed this because aws limits for the number of AWS CloudFront Cache Policies in your account
|
|
190
|
+
// const seoCachePolicy = new aws_cloudfront.CachePolicy(this, `seo-cp-${seo.uniqueKey}`, {
|
|
191
|
+
// cachePolicyName: this.resourceName(`${props.webEntryConfig.name}-${seo.uniqueKey}`),
|
|
192
|
+
// headerBehavior: aws_cloudfront.CacheHeaderBehavior.allowList(
|
|
193
|
+
// qpqHeaderIsBot,
|
|
194
|
+
// ...seo.cache.headers,
|
|
195
|
+
// ),
|
|
196
|
+
// defaultTtl: cdk.Duration.seconds(seo.cache.defaultTTLInSeconds),
|
|
197
|
+
// minTtl: cdk.Duration.seconds(seo.cache.minTTLInSeconds),
|
|
198
|
+
// maxTtl: cdk.Duration.seconds(seo.cache.maxTTLInSeconds),
|
|
199
|
+
// enableAcceptEncodingGzip: true,
|
|
200
|
+
// enableAcceptEncodingBrotli: true,
|
|
201
|
+
// });
|
|
197
202
|
const wildcardPath = seo.path.replaceAll(/{(.+?)}/g, '*');
|
|
198
203
|
distribution.addBehavior(wildcardPath, distributionOrigin, {
|
|
199
|
-
cachePolicy: seoCachePolicy,
|
|
204
|
+
// cachePolicy: seoCachePolicy,
|
|
200
205
|
viewerProtocolPolicy: aws_cdk_lib_1.aws_cloudfront.ViewerProtocolPolicy.REDIRECT_TO_HTTPS,
|
|
201
206
|
compress: props.webEntryConfig.compressFiles,
|
|
202
207
|
responseHeadersPolicy: responseHeaderPolicy,
|
|
@@ -213,25 +218,33 @@ class QpqWebserverWebEntryConstruct extends QpqConstructBlock_1.QpqConstructBloc
|
|
|
213
218
|
});
|
|
214
219
|
}
|
|
215
220
|
}
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
}
|
|
221
|
+
// Removed this because aws limits for the number of AWS CloudFront Cache Policies in your account
|
|
222
|
+
// const ignoreCacheResponseHeaderPolicy = new aws_cloudfront.ResponseHeadersPolicy(
|
|
223
|
+
// this,
|
|
224
|
+
// `dist-rhp-ignore`,
|
|
225
|
+
// {
|
|
226
|
+
// responseHeadersPolicyName: this.qpqResourceName(props.webEntryConfig.name, 'ignore'),
|
|
227
|
+
// customHeadersBehavior: {
|
|
228
|
+
// customHeaders: [
|
|
229
|
+
// {
|
|
230
|
+
// header: 'Cache-Control',
|
|
231
|
+
// value: `max-age=300, must-revalidate`,
|
|
232
|
+
// override: true,
|
|
233
|
+
// },
|
|
234
|
+
// ],
|
|
235
|
+
// },
|
|
236
|
+
// securityHeadersBehavior: convertSecurityHeadersFromQpqSecurityHeaders(
|
|
237
|
+
// qpqWebServerUtils.getBaseDomainName(props.qpqConfig),
|
|
238
|
+
// props.webEntryConfig.securityHeaders,
|
|
239
|
+
// ),
|
|
240
|
+
// },
|
|
241
|
+
// );
|
|
229
242
|
props.webEntryConfig.ignoreCache.forEach((pathPattern) => {
|
|
230
243
|
distribution.addBehavior(pathPattern, distributionOrigin, {
|
|
231
244
|
cachePolicy: aws_cdk_lib_1.aws_cloudfront.CachePolicy.CACHING_DISABLED,
|
|
232
245
|
viewerProtocolPolicy: aws_cdk_lib_1.aws_cloudfront.ViewerProtocolPolicy.REDIRECT_TO_HTTPS,
|
|
233
246
|
compress: props.webEntryConfig.compressFiles,
|
|
234
|
-
responseHeadersPolicy: ignoreCacheResponseHeaderPolicy,
|
|
247
|
+
// responseHeadersPolicy: ignoreCacheResponseHeaderPolicy,
|
|
235
248
|
});
|
|
236
249
|
});
|
|
237
250
|
}
|
package/package.json
CHANGED
|
@@ -256,22 +256,24 @@ export class QpqWebserverWebEntryConstruct extends QpqConstructBlock {
|
|
|
256
256
|
continue;
|
|
257
257
|
}
|
|
258
258
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
259
|
+
// TODO: Find a better solution for this.
|
|
260
|
+
// Removed this because aws limits for the number of AWS CloudFront Cache Policies in your account
|
|
261
|
+
// const seoCachePolicy = new aws_cloudfront.CachePolicy(this, `seo-cp-${seo.uniqueKey}`, {
|
|
262
|
+
// cachePolicyName: this.resourceName(`${props.webEntryConfig.name}-${seo.uniqueKey}`),
|
|
263
|
+
// headerBehavior: aws_cloudfront.CacheHeaderBehavior.allowList(
|
|
264
|
+
// qpqHeaderIsBot,
|
|
265
|
+
// ...seo.cache.headers,
|
|
266
|
+
// ),
|
|
267
|
+
// defaultTtl: cdk.Duration.seconds(seo.cache.defaultTTLInSeconds),
|
|
268
|
+
// minTtl: cdk.Duration.seconds(seo.cache.minTTLInSeconds),
|
|
269
|
+
// maxTtl: cdk.Duration.seconds(seo.cache.maxTTLInSeconds),
|
|
270
|
+
// enableAcceptEncodingGzip: true,
|
|
271
|
+
// enableAcceptEncodingBrotli: true,
|
|
272
|
+
// });
|
|
271
273
|
|
|
272
274
|
const wildcardPath = seo.path.replaceAll(/{(.+?)}/g, '*');
|
|
273
275
|
distribution.addBehavior(wildcardPath, distributionOrigin, {
|
|
274
|
-
cachePolicy: seoCachePolicy,
|
|
276
|
+
// cachePolicy: seoCachePolicy,
|
|
275
277
|
viewerProtocolPolicy: aws_cloudfront.ViewerProtocolPolicy.REDIRECT_TO_HTTPS,
|
|
276
278
|
compress: props.webEntryConfig.compressFiles,
|
|
277
279
|
responseHeadersPolicy: responseHeaderPolicy,
|
|
@@ -289,33 +291,34 @@ export class QpqWebserverWebEntryConstruct extends QpqConstructBlock {
|
|
|
289
291
|
}
|
|
290
292
|
}
|
|
291
293
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
294
|
+
// Removed this because aws limits for the number of AWS CloudFront Cache Policies in your account
|
|
295
|
+
// const ignoreCacheResponseHeaderPolicy = new aws_cloudfront.ResponseHeadersPolicy(
|
|
296
|
+
// this,
|
|
297
|
+
// `dist-rhp-ignore`,
|
|
298
|
+
// {
|
|
299
|
+
// responseHeadersPolicyName: this.qpqResourceName(props.webEntryConfig.name, 'ignore'),
|
|
300
|
+
// customHeadersBehavior: {
|
|
301
|
+
// customHeaders: [
|
|
302
|
+
// {
|
|
303
|
+
// header: 'Cache-Control',
|
|
304
|
+
// value: `max-age=300, must-revalidate`,
|
|
305
|
+
// override: true,
|
|
306
|
+
// },
|
|
307
|
+
// ],
|
|
308
|
+
// },
|
|
309
|
+
// securityHeadersBehavior: convertSecurityHeadersFromQpqSecurityHeaders(
|
|
310
|
+
// qpqWebServerUtils.getBaseDomainName(props.qpqConfig),
|
|
311
|
+
// props.webEntryConfig.securityHeaders,
|
|
312
|
+
// ),
|
|
313
|
+
// },
|
|
314
|
+
// );
|
|
312
315
|
|
|
313
316
|
props.webEntryConfig.ignoreCache.forEach((pathPattern) => {
|
|
314
317
|
distribution.addBehavior(pathPattern, distributionOrigin, {
|
|
315
318
|
cachePolicy: aws_cloudfront.CachePolicy.CACHING_DISABLED,
|
|
316
319
|
viewerProtocolPolicy: aws_cloudfront.ViewerProtocolPolicy.REDIRECT_TO_HTTPS,
|
|
317
320
|
compress: props.webEntryConfig.compressFiles,
|
|
318
|
-
responseHeadersPolicy: ignoreCacheResponseHeaderPolicy,
|
|
321
|
+
// responseHeadersPolicy: ignoreCacheResponseHeaderPolicy,
|
|
319
322
|
});
|
|
320
323
|
});
|
|
321
324
|
}
|