Skip to content

Commit

Permalink
Merge branch 'main' into new-sessions-table
Browse files Browse the repository at this point in the history
  • Loading branch information
gbone-restore committed Oct 11, 2024
2 parents 6df8aca + 77ec531 commit e32f9ab
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions lib/user-interface/public-website.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import * as cf from "aws-cdk-lib/aws-cloudfront";
import * as origins from "aws-cdk-lib/aws-cloudfront-origins";
import * as s3 from "aws-cdk-lib/aws-s3";
import * as acm from "aws-cdk-lib/aws-certificatemanager";
import * as wafv2 from "aws-cdk-lib/aws-wafv2";
import { Construct } from "constructs";
import { Shared } from "../shared";
import { SystemConfig } from "../shared/types";
Expand Down Expand Up @@ -59,22 +58,6 @@ export class PublicWebsite extends Construct {
}
);

let webAcl;
if (props.shared.webACLRules.length > 0) {
webAcl = new wafv2.CfnWebACL(this, "WafCloudfront", {
defaultAction: { allow: {} },
scope: "CLOUDFRONT",
visibilityConfig: {
cloudWatchMetricsEnabled: true,
metricName: "WafCloudfront",
sampledRequestsEnabled: true,
},
description: "WAFv2 ACL for CloudFront",
name: "WafCloudfront",
rules: props.shared.webACLRules,
});
}

const fileBucketURLs = [
`https://${props.chatbotFilesBucket.bucketName}.s3-accelerate.amazonaws.com`,
`https://${props.chatbotFilesBucket.bucketName}.s3.amazonaws.com`,
Expand Down Expand Up @@ -155,7 +138,6 @@ export class PublicWebsite extends Construct {
priceClass: cf.PriceClass.PRICE_CLASS_ALL,
httpVersion: cf.HttpVersion.HTTP2_AND_3,
minimumProtocolVersion: cf.SecurityPolicyProtocol.TLS_V1_2_2021,
webAclId: webAcl ? webAcl.attrArn : undefined,
enableLogging: true,
logBucket: distributionLogsBucket,
logIncludesCookies: false,
Expand Down

0 comments on commit e32f9ab

Please sign in to comment.