Path matching
This commit is contained in:
@@ -36,7 +36,7 @@ class RuleTest < ActiveSupport::TestCase
|
||||
test "should create valid rate_limit rule" do
|
||||
rule = Rule.new(
|
||||
waf_rule_type: "rate_limit",
|
||||
waf_action: "rate_limit",
|
||||
waf_action: "deny", # Rate limit rules use deny action when triggered
|
||||
conditions: { cidr: "0.0.0.0/0", scope: "global" },
|
||||
metadata: { limit: 100, window: 60 },
|
||||
source: "manual",
|
||||
@@ -83,7 +83,7 @@ class RuleTest < ActiveSupport::TestCase
|
||||
test "should validate rate_limit has limit and window in metadata" do
|
||||
rule = Rule.new(
|
||||
waf_rule_type: "rate_limit",
|
||||
waf_action: "rate_limit",
|
||||
waf_action: "deny", # Rate limit rules use deny action when triggered
|
||||
conditions: { cidr: "0.0.0.0/0", scope: "global" },
|
||||
metadata: { limit: 100 }, # Missing window
|
||||
user: users(:one)
|
||||
|
||||
Reference in New Issue
Block a user