Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cdk-cloudfront-plus

Package Overview
Dependencies
Maintainers
1
Versions
208
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cdk-cloudfront-plus

CDK construct library for CloudFront Extensions

  • 0.1.8
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

NPM version PyPI version Release

cdk-cloudfront-plus

CDK constructs library that allows you to build AWS CloudFront Extensions in JavaScript, TypeScript or Python.

Sample

import * as cfplus from 'cdk-cloudfront-plus';

const app = new cdk.App();

const stack = new cdk.Stack(app, 'demo-stack');

// prepare the `modify resonse header` extension
const modifyRespHeader = new extensions.ModifyResponseHeader(stack, 'ModifyResp');

// prepare the `anti-hotlinking` extension
const antiHotlinking = new extensions.AntiHotlinking(stack, 'AntiHotlink', {
  referer: [
    'example.com',
    'exa?ple.*',
  ],
});

// create the cloudfront distribution with extension(s)
new Distribution(stack, 'dist', {
  defaultBehavior: {
    origin: new origins.HttpOrigin('aws.amazon.com'),
    edgeLambdas: [
      modifyRespHeader,
      antiHotlinking,
    ],
  },
});

Available Extensions in AWS CDK

Extension NameCategorySolution IDFunction/Folder NameStatus
Access Origin by geolocationOrigin SelectionSO8118cf-access-origin-by-geolocationWIP
Convert Query StringOverride RequestSO8113cf-convert-query-stringWIP
OAuth2 AuthenticationAuthenticationSO8131cfn-authentication-by-oauth2WIP
Cognito RedirectAuthenticationSO8132cf-authentication-by-cognito-redirectWIP
Custom Log to Kinesis FirehoseLoggingSO8133cf-global-data-ingestionWIP
HTTP 302 from OriginURL RedirectSO8103cf-http302-from-originWIP
Default Directory Index for Amazon S3 OriginURL RedirectSO8134cf-default-dir-indexCompleted
Modify Response HeaderHeader RewriteSO8105modify-response-headerCompleted
Anti HotlinkingSecuritySO8126anti-hotlinkingCompleted
Add Security HeadersSecuritySO8102add-security-headersCompleted

Keywords

FAQs

Package last updated on 29 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc