Skip to content

Commit

Permalink
update waf web acl
Browse files Browse the repository at this point in the history
  • Loading branch information
mats16 committed Oct 31, 2022
1 parent 4ccc613 commit ce6ba11
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/functions/create-web-acl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,23 +59,6 @@ export const handler: CdkCustomResourceHandler = async (event, _context) => {
if (typeof rule.Statement?.RateBasedStatement != 'undefined') {
rule.Statement.RateBasedStatement.Limit = Number(rule.Statement.RateBasedStatement.Limit);
}
// for Supabase Studio SSR
if (typeof rule.Statement?.ManagedRuleGroupStatement != 'undefined' && rule.Statement.ManagedRuleGroupStatement.Name == 'AWSManagedRulesBotControlRuleSet') {
rule.Statement.ManagedRuleGroupStatement.ScopeDownStatement = {
NotStatement: {
Statement: {
ByteMatchStatement: {
SearchString: fromUtf8('node-fetch'),
FieldToMatch: {
SingleHeader: { Name: 'user-agent' },
},
TextTransformations: [{ Priority: 0, Type: 'NONE' }],
PositionalConstraint: 'STARTS_WITH',
},
},
},
};
};
//if (typeof rule.Statement?.ManagedRuleGroupStatement != 'undefined' && rule.Statement.ManagedRuleGroupStatement.Name == 'AWSManagedRulesATPRuleSet') {
// rule.Statement.ManagedRuleGroupStatement.ScopeDownStatement = {
// ByteMatchStatement: {
Expand Down

0 comments on commit ce6ba11

Please sign in to comment.