waf_condition_size.tf 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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 = "GT"
  42. size = "50"
  43. field_to_match {
  44. type = "HEADER"
  45. data = "cookie"
  46. }
  47. }
  48. size_constraints {
  49. text_transformation = "NONE"
  50. comparison_operator = "LT"
  51. size = "256"
  52. field_to_match {
  53. type = "HEADER"
  54. data = "cookie"
  55. }
  56. }
  57. }