Module development question regarding ngx_http_get_module_loc_conf
Valentin V. Bartenev
ne at vbart.ru
Wed Jul 11 21:45:46 UTC 2012
On Thursday 12 July 2012 01:00:11 Aaron Bedra wrote:
> Oh wow, I didn't realize that. I just tried another phase
> (NGX_HTTP_PREACCESS_PHASE) and the configuration showed up as expected.
> Thanks so much for pointing this out! The only other question is what phase
> to put this in. When I use preaccess the header shows up twice.
It is because your module does not properly handle internal redirects (and
subrequests btw).
As an example, see the first lines of ngx_http_limit_req_handler() or
ngx_http_limit_conn_handler().
Btw, if the purpose of your module is to add header, then it's better to develop
a header filter.
Also note, that is_abuser() blocks nginx process.
wbr, Valentin V. Bartenev
More information about the nginx-devel
mailing list