Get $request_body before content handlers?

Mike Gagnon mikegagnon at
Sun Jul 8 23:28:09 UTC 2012

On Sat, Jul 7, 2012 at 8:19 PM, agentzh <agentzh at> wrote:

> > Is it possible to hack nginx such that the rewrite phase is delayed until
> > after the request_body is available? I am writing a module that analyzes
> > requests during the rewrite phase to determine where to route them. The
> goal
> > is to use online machine learning to detect suspicious requests and
> re-route
> > them to a quarantine.
> >
> We're just using ngx_lua to do suspicious request filtering in rewrite
> and/or access phases. It's convenient (and also rather efficient) to
> use the various Lua APIs for Nginx provided by ngx_lua. See
Oh, yeah I ment to ask, but forgot. I'm curious to learn more about your
code to filter suspicious requests. I looked at but did not see anything specifically
regarding filting suspicious requests.

Thanks again!

Mike Gagnon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx-devel mailing list