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.3.140
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9
decreased by-95.75%
Maintainers
1
Weekly downloads
 
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 NameStatusContributor
Access Origin by geolocationOrigin SelectionSO8118cf-access-origin-by-geolocationCompleted@pahud PR#52
Redirect by geolocationOrigin SelectionSO8135cf-redirect-by-geolocationCompleted@minche-tsai PR#50
Convert Query StringOverride RequestSO8113cf-convert-query-stringCompleted@HsiehShuJeng PR#53
OAuth2 AuthenticationAuthenticationSO8131cf-authentication-by-oauth2Completed@dwchiang PR#59
Cognito RedirectAuthenticationSO8132cf-authentication-by-cognito-redirectWIP(BabooPan)-
Global Data IngestionLoggingSO8133cf-global-data-ingestionCompleted@titanjer PR#62
HTTP 302 from OriginURL RedirectSO8103cf-http302-from-originCompleted@RicoToothless PR#71
Default Directory Index for Amazon S3 OriginURL RedirectSO8134cf-default-dir-indexCompleted@guan840912 PR#21
Modify Response HeaderHeader RewriteSO8105cf-modify-response-headerCompleted@pahud PR#45
Custom Error PageHeader RewriteSO8136cf-custom-error-pageCompleted@BabooPan PR#46
Anti HotlinkingSecuritySO8126cf-anti-hotlinkingCompleted@pahud PR#2
Add Security HeadersSecuritySO8102cf-add-security-headersCompleted@pahud PR#7
Failover to alternative originOrigin SelectionSO8120cf-multiple-origin-ip-retryCompleted@guan840912 PR#58
Normalize Query StringOverride RequestSO8112cf-normalize-query-stringCompleted@benkajaja PR#64

Keywords

FAQs

Package last updated on 04 Nov 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