dcl-ops-lib 6.3.0 → 6.5.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.
- package/StaticWebsite.d.ts +2 -0
- package/buildStatic.js +9 -1
- package/package.json +1 -1
package/StaticWebsite.d.ts
CHANGED
package/buildStatic.js
CHANGED
|
@@ -23,7 +23,7 @@ function buildStatic(staticSite) {
|
|
|
23
23
|
const slug = staticSite.domain.replace(/\./g, "-") + "-";
|
|
24
24
|
// contentBucket is the S3 bucket that the website's contents will be stored in.
|
|
25
25
|
const bucketInfo = {
|
|
26
|
-
acl: "public-read",
|
|
26
|
+
acl: staticSite.overrideContentBucketACL ? staticSite.overrideContentBucketACL : "public-read",
|
|
27
27
|
// Configure S3 to serve bucket contents as a website. This way S3 will automatically convert
|
|
28
28
|
// requests for "foo/" to "foo/index.html".
|
|
29
29
|
website: {
|
|
@@ -38,6 +38,14 @@ function buildStatic(staticSite) {
|
|
|
38
38
|
const contentBucket = new aws.s3.Bucket(slug + "contentBucket", bucketInfo, {
|
|
39
39
|
protect,
|
|
40
40
|
});
|
|
41
|
+
if (staticSite.objectOwnership) {
|
|
42
|
+
new aws.s3.BucketOwnershipControls(`${contentBucket.bucket}OwnershipControls`, {
|
|
43
|
+
bucket: contentBucket.bucket,
|
|
44
|
+
rule: {
|
|
45
|
+
objectOwnership: staticSite.objectOwnership
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
41
49
|
// logsBucket is an S3 bucket that will contain the CDN's request logs.
|
|
42
50
|
const logsBucket = new aws.s3.Bucket(slug + "logs", {
|
|
43
51
|
acl: "private",
|