Skip to content

Commit

Permalink
Add template-category & template-categories to the waf rules (#1462)
Browse files Browse the repository at this point in the history
* Add template-category & template-categories to the waf rules

* add new regular_expression block

* Fix
  • Loading branch information
whabanks authored Jul 24, 2024
1 parent 7f65cbd commit aac0ff0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aws/common/waf.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 = {
Expand Down

0 comments on commit aac0ff0

Please sign in to comment.