Skip to content

Commit

Permalink
Add support for cookie matching (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
felipe88alves authored Mar 22, 2023
1 parent 92bdd66 commit 157e33b
Show file tree
Hide file tree
Showing 2 changed files with 853 additions and 0 deletions.
25 changes: 25 additions & 0 deletions examples/wafv2-bytematch-rules/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,31 @@ module "waf" {
type = "LOWERCASE" # The text transformation type
}

visibility_config = {
cloudwatch_metrics_enabled = false
sampled_requests_enabled = false
}
},
{
# Blocks a single user by checking the username header
name = "block-cookie"
priority = "6"
action = "block"

byte_match_statement = {
field_to_match = {
cookies = {
match_pattern = {
"all" = {}
}
}
}
positional_constraint = "CONTAINS"
search_string = "cookie"
priority = 0
type = "NONE" # The text transformation type
}

visibility_config = {
cloudwatch_metrics_enabled = false
sampled_requests_enabled = false
Expand Down
Loading

0 comments on commit 157e33b

Please sign in to comment.