Quantcast
Channel: Nginx Forum
Viewing all articles
Browse latest Browse all 53287

Re: Filter insertion and ordering

$
0
0
On Jan 15, 2013, at 5:35 AM, Nick Kew <niq@apache.org> wrote:
>
> Thanks. Yes, that was of course the problem.
>
> I guess control of my ordering relative to other modules isn't available?
>

Nick,
FWIW, we write most of our nginx modules as Lua modules now. Sometimes almost all of the module is actually in C. We can control the exact order per request using Lua.

Contrived example:

local foo = require 'nginx.foo_filter'
local bar = require 'nginx.bar_filter'

if something then
return run_filters(ngx, { foo, bar })
else
return run_filters(ngx, { bar, foo})
end

--Brian
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel

Viewing all articles
Browse latest Browse all 53287

Trending Articles