mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 11:16:33 +03:00
Add the ability to build custom request body parser extensions.
Add an example for a request body parser extension.
This commit is contained in:
17
ext/README
17
ext/README
@@ -54,6 +54,23 @@ that combines the REMOTE_ADDR and REMOTE_PORT into a.b.c.d:port format.
|
||||
sudo apxs -i mod_var_remote_addr_port.la
|
||||
|
||||
|
||||
3) Example custom request body parser module
|
||||
|
||||
Module mod_reqbody_example.c creates a custom request body parser named
|
||||
"EXAMPLE". It does noting in particular, but shows the basic structure
|
||||
of such a module.
|
||||
|
||||
# Compile as a normal user
|
||||
apxs -I<MODSECURITY_SOURCE_CODE> -I/usr/include/libxml2 \
|
||||
-ca mod_reqbody_example.c
|
||||
|
||||
# Install as superuser
|
||||
sudo apxs -i mod_var_remote_addr_port.la
|
||||
|
||||
# Write a phase 1 rule to set the parser
|
||||
SecAction "phase:1,pass,nolog,ctl:requestBodyProcessor=EXAMPLE"
|
||||
|
||||
|
||||
Using the Modules
|
||||
-----------------
|
||||
|
||||
|
Reference in New Issue
Block a user