Skip to content

Commit

Permalink
fix tests on coraza waf
Browse files Browse the repository at this point in the history
  • Loading branch information
jcmoraisjr committed Mar 20, 2024
1 parent d6993b0 commit 8e8a2c4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/haproxy/instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5090,8 +5090,14 @@ spoe-message check-request
endpoints: []string{"10.0.0.101:12345"},
backendExp: `
filter spoe engine modsecurity config /etc/haproxy/spoe-modsecurity.conf
http-request redirect code 302 location %[var(txn.coraza.data)] if { var(txn.coraza.action) -m str redirect }
http-response redirect code 302 location %[var(txn.coraza.data)] if { var(txn.coraza.action) -m str redirect }
http-request deny deny_status 403 hdr waf-block "request" if { var(txn.coraza.action) -m str deny }
http-response deny deny_status 403 hdr waf-block "response" if { var(txn.coraza.action) -m str deny }
http-request silent-drop if { var(txn.coraza.action) -m str drop }
http-response silent-drop if { var(txn.coraza.action) -m str drop }
http-request deny deny_status 504 if { var(txn.coraza.error) -m int gt 0 }
http-request deny if !{ var(txn.coraza.fail) -m int eq 0 }`,
http-response deny deny_status 504 if { var(txn.coraza.error) -m int gt 0 }`,
modsecExp: `
timeout connect 1s
timeout server 2s
Expand Down

0 comments on commit 8e8a2c4

Please sign in to comment.