How to use the @aws-cdk/aws-cloudfront.HttpVersion function in @aws-cdk/aws-cloudfront

To help you get started, we’ve selected a few @aws-cdk/aws-cloudfront examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github fogfish / aws-cdk-pure / hoc / src / staticweb.ts View on Github external
const SiteCDN = (): cdn.CloudFrontWebDistributionProps => ({
    aliasConfiguration: {
      acmCertRef,
      names: [ site(props) ],
      securityPolicy: cdn.SecurityPolicyProtocol.TLS_V1_2_2018,
      sslMethod: cdn.SSLMethod.SNI,
    },
    httpVersion: cdn.HttpVersion.HTTP1_1,
    originConfigs: [
      {
        behaviors : [
          {
            defaultTtl: cdk.Duration.hours(24),
            forwardedValues: {queryString: true},
            isDefaultBehavior: true,
            maxTtl: cdk.Duration.hours(24),
            minTtl: cdk.Duration.seconds(0),
          }
        ],
        originPath: (!props.sites || props.sites.length === 0) ? '/' : props.sites[0].origin,
        s3OriginSource: {
          s3BucketSource
        },
      }