httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Hughes <hughes.m...@gmail.com>
Subject [users@httpd] Using mod_lua to modify request body before being sent to mod_proxy
Date Sat, 16 Apr 2016 01:10:06 GMT
I currently have Apache setup as a reverse proxy to another server.

I was hoping to use mod_lua to slightly tweak the request body of incoming requests before
sending them off to the other server. I have mod_lua setup enough so that I have a LuaHookInsertFilter
that is pointing to my LuaInputFilter. But the question is, what does the function in the
LuaHookInsertFilter have to return so that the modified request continues on to the proxy?

Right now I have something like:

function handle(r)
    r.info(r, "example handler called") -- debug print
    r:add_input_filter("myInputFilter")
    return apache2.PROXYREQ_REVERSE
end
Am I using the right LuaHook? Any examples would be greatly appreciated.





Mime
View raw message