From aac0ff09e2977931492797f266718c73724d6624 Mon Sep 17 00:00:00 2001 From: William B <7444334+whabanks@users.noreply.github.com> Date: Wed, 24 Jul 2024 15:20:49 -0400 Subject: [PATCH] Add template-category & template-categories to the waf rules (#1462) * Add template-category & template-categories to the waf rules * add new regular_expression block * Fix --- aws/common/waf.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aws/common/waf.tf b/aws/common/waf.tf index c2ff2e4b5..7f5ed7217 100644 --- a/aws/common/waf.tf +++ b/aws/common/waf.tf @@ -18,7 +18,7 @@ resource "aws_wafv2_regex_pattern_set" "re_api" { scope = "REGIONAL" regular_expression { - regex_string = var.env == "production" ? "/_status.*|/api-key.*|/complaint.*|/email-branding.*|/events.*|/inbound-number.*|/invite.*|/letter-branding.*|/letters.*" : "/_debug|/_status.*|/api-key.*|/complaint.*|/email-branding.*|/events.*|/inbound-number.*|/invite.*|/letter-branding.*|/letters.*|/template-category.*|/template-categories.*" + regex_string = var.env == "production" ? "/_status.*|/api-key.*|/complaint.*|/email-branding.*|/events.*|/inbound-number.*|/invite.*|/letter-branding.*|/letters.*" : "/_debug|/_status.*|/api-key.*|/complaint.*|/email-branding.*|/events.*|/inbound-number.*|/invite.*|/letter-branding.*|/letters.*|/template-category.*" } regular_expression { @@ -98,7 +98,7 @@ resource "aws_wafv2_regex_pattern_set" "re_admin2" { # https://docs.aws.amazon.com/waf/latest/developerguide/waf-regex-pattern-set-managing.html regular_expression { - regex_string = "/sitemap|/plandesite|/agree-terms|/getting-started|/decouvrir-notification-gc|/template-categories.*" + regex_string = "/sitemap|/plandesite|/agree-terms|/getting-started|/decouvrir-notification-gc|/template-category.*|/template-categories.*" } tags = {