Skip to content

Commit 5675149

Browse files
authored
Merge pull request #1 from gentgaashi/patch-2
Added custom config for ResponseHeadersPolicyId
2 parents b65caa6 + 58bd552 commit 5675149

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,15 @@ class ServerlessFullstackPlugin {
345345
this.prepareS3(resources.Resources);
346346
this.prepareMinimumProtocolVersion(distributionConfig);
347347
this.prepareCompressWebContent(distributionConfig);
348+
this.prepareResponseHeadersPolicyId(distributionConfig);
349+
}
350+
351+
prepareResponseHeadersPolicyId(distributionConfig) {
352+
const responseHeadersPolicyId = this.getConfig('responseHeadersPolicyId', undefined);
348353

354+
if (responseHeadersPolicyId) {
355+
distributionConfig.DefaultCacheBehavior.ResponseHeadersPolicyId = responseHeadersPolicyId;
356+
}
349357
}
350358

351359
prepareLogging(distributionConfig) {

0 commit comments

Comments
 (0)