File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { FunctionEventType } from "aws-cdk-lib/aws-cloudfront";
3
3
import type { Construct as CdkConstruct } from "constructs" ;
4
4
import type { AwsProvider } from "@lift/providers" ;
5
5
import type { BucketProps } from "aws-cdk-lib/aws-s3" ;
6
+ import { BlockPublicAccess } from "aws-cdk-lib/aws-s3" ;
6
7
import { RemovalPolicy } from "aws-cdk-lib" ;
7
8
import { redirectToMainDomain } from "../../classes/cloudfrontFunctions" ;
8
9
import { getCfnFunctionAssociations } from "../../utils/getDefaultCfnFunctionAssociations" ;
@@ -71,6 +72,12 @@ export class StaticWebsite extends StaticWebsiteAbstract {
71
72
websiteErrorDocument : this . errorPath ( ) ,
72
73
// public read access is required when enabling static website hosting
73
74
publicReadAccess : true ,
75
+ blockPublicAccess : new BlockPublicAccess ( {
76
+ blockPublicAcls : false ,
77
+ blockPublicPolicy : false ,
78
+ ignorePublicAcls : false ,
79
+ restrictPublicBuckets : false ,
80
+ } ) ,
74
81
// For a static website, the content is code that should be versioned elsewhere
75
82
removalPolicy : RemovalPolicy . DESTROY ,
76
83
} ;
You can’t perform that action at this time.
0 commit comments