Closed vasicvuk closed 2 years ago
I think the most straight forward example is the internal one using is2.
To integrate into a server or even a standalone application:
Define/set callbacks for getting the bits from the http request:
is2
callbacks: https://github.com/EdgeCast/waflz/blob/master/util/waflz_server/cb.cc This part is somewhat tricky but there's a basic example in the README.md:
waflz
can consume "modsecurity" rules in a few formats including the native modsecurity rule format:
Then call the profile process from the "waf" object:
is2
: https://github.com/EdgeCast/waflz/blob/master/util/waflz_server/sx_profile.cc#L189This might be the best example of how to use:
Apologies for the complexity. We probably haven't spent enough time making it easy to use and play with outside of servers, but it was designed with server-less development in mind, especially for mocking in tests:
It would be great to have an example of how to call Waflz from C++ executing rules on sample request body or response.