waf_condition_size.tf 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. resource "aws_wafregional_size_constraint_set" "size_restrictions" {
  2. name = "${var.waf_prefix}-generic-size-restrictions"
  3. size_constraints {
  4. text_transformation = "NONE"
  5. comparison_operator = "GT"
  6. size = "4096"
  7. field_to_match {
  8. type = "BODY"
  9. }
  10. }
  11. size_constraints {
  12. text_transformation = "NONE"
  13. comparison_operator = "GT"
  14. size = "4093"
  15. field_to_match {
  16. type = "HEADER"
  17. data = "cookie"
  18. }
  19. }
  20. size_constraints {
  21. text_transformation = "NONE"
  22. comparison_operator = "GT"
  23. size = "1024"
  24. field_to_match {
  25. type = "QUERY_STRING"
  26. }
  27. }
  28. size_constraints {
  29. text_transformation = "NONE"
  30. comparison_operator = "GT"
  31. size = "512"
  32. field_to_match {
  33. type = "URI"
  34. }
  35. }
  36. }
  37. resource "aws_wafregional_size_constraint_set" "csrf_token_set" {
  38. name = "${var.waf_prefix}-generic-match-csrf-token"
  39. size_constraints {
  40. text_transformation = "NONE"
  41. comparison_operator = "EQ"
  42. size = "118"
  43. field_to_match {
  44. type = "HEADER"
  45. data = "cookie"
  46. }
  47. }
  48. }