mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 03:34:29 +03:00
Adding multithreaded example from issue #3054 (by airween)
- Rewritten to use C++ libModSecurity API and std::thread (instead of pthreads)
This commit is contained in:
14
examples/multithread/basic_rules.conf
Normal file
14
examples/multithread/basic_rules.conf
Normal file
@@ -0,0 +1,14 @@
|
||||
SecDebugLog debug.log
|
||||
SecDebugLogLevel 9
|
||||
|
||||
|
||||
SecRule REQUEST_HEADERS:User-Agent ".*" "id:1,phase:1,t:sha1,t:hexEncode,setvar:tx.ua_hash=%{MATCHED_VAR}"
|
||||
|
||||
SecAction "id:2,phase:2,initcol:ip=%{REMOTE_ADDR}_%{tx.ua_hash}"
|
||||
|
||||
SecRule REQUEST_HEADERS:User-Agent "@rx .*" "id:3,phase:2,setvar:ip.auth_attempt=+1"
|
||||
|
||||
SecRule ARGS:foo "@rx herewego" "id:4,phase:2,setvar:ip.foo=bar,expirevar:ip.foo=2"
|
||||
#SecRule ARGS:foo "@rx herewego" "id:4,phase:2,setvar:ip.foo=bar"
|
||||
SecRule IP "@rx bar" "id:5,phase:2,pass"
|
||||
SecRule IP:auth_attempt "@rx bar" "id:6,phase:2,pass"
|
Reference in New Issue
Block a user