2.0.28 • Published 6 months ago

@gammarers/aws-waf-geo-restrict-rule v2.0.28

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
6 months ago

AWS WAF(v2) GEO Restrict Rule

GitHub npm (scoped) PyPI GitHub Workflow Status (branch) GitHub release (latest SemVer)

View on Construct Hub

This is an AWS CDK WAF Geo Restrict Rule on WAF V2

Install

TypeScript

install by npm

npm install @gammarers/aws-waf-geo-restrict-rule

install by yarn

yarn add @gammarers/aws-waf-geo-restrict-rule

Python

pip install gammarers.aws-waf-geo-restrict-rule

Example

import { WAFGeoRestrictRule } from '@gammarers/aws-waf-geo-restrict-rule';

const geoRestrictRule = new WAFGeoRestrictRule({
  allowCountries: ['JP'],
});

new wafv2.CfnWebACL(stack, 'WebACL', {
  defaultAction: { allow: {} },
  scope: 'CLOUD_FRONT',
  name: 'WebAclWithCustomRules',
  visibilityConfig: {
    cloudWatchMetricsEnabled: true,
    metricName: 'WebAclMetric',
    sampledRequestsEnabled: true,
  },
  rules: [
    geoRestrictRule.allowRule({
      priority: 1,
    }),
    geoRestrictRule.blockRule({
      priority: 2,
    }),
  ],
});

License

This project is licensed under the Apache-2.0 License.

2.0.28

6 months ago

2.0.27

6 months ago

2.0.26

6 months ago

2.0.25

6 months ago

2.0.24

7 months ago

2.0.23

7 months ago

2.0.22

7 months ago

2.0.21

7 months ago

2.0.20

8 months ago

2.0.19

8 months ago

2.0.18

8 months ago

2.0.17

8 months ago

2.0.16

8 months ago

2.0.15

9 months ago

2.0.14

9 months ago

2.0.13

9 months ago

2.0.12

9 months ago

2.0.11

10 months ago

2.0.10

10 months ago

2.0.9

10 months ago

2.0.8

10 months ago

2.0.7

11 months ago

2.0.6

11 months ago

2.0.5

11 months ago

2.0.4

11 months ago

2.0.3

11 months ago

2.0.2

11 months ago

2.0.1

11 months ago

2.0.0

11 months ago