Skip to content

Commit

Permalink
fix: do not block public access for buckets with public read access (#70
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Grzegorz Rajchman authored Apr 24, 2023
1 parent 75c40b0 commit 5787c21
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,12 @@ export class SimpleAuthenticatedApiStack extends cdk.Stack {
`${prefix}simple-authenticated-api-docs`,
{
bucketName: `${prefix}simple-authenticated-api-docs`,
blockPublicAccess: {
blockPublicAcls: false,
blockPublicPolicy: false,
ignorePublicAcls: false,
restrictPublicBuckets: false,
},
publicReadAccess: true,
removalPolicy: cdk.RemovalPolicy.DESTROY,
websiteIndexDocument: "index.html",
Expand Down
6 changes: 6 additions & 0 deletions lib/cdn-site-hosting/cdn-site-hosting-construct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ export class CdnSiteHostingConstruct extends cdk.Construct {
bucketName: siteDomain,
websiteIndexDocument: props.websiteIndexDocument,
websiteErrorDocument,
blockPublicAccess: {
blockPublicAcls: false,
blockPublicPolicy: false,
ignorePublicAcls: false,
restrictPublicBuckets: false,
},
publicReadAccess: true,
removalPolicy: props.removalPolicy,
autoDeleteObjects: props.removalPolicy === cdk.RemovalPolicy.DESTROY,
Expand Down

0 comments on commit 5787c21

Please sign in to comment.