Welcome! Log In Create A New Profile

Advanced

Re: Module development question regarding ngx_http_get_module_loc_conf

Valentin V. Bartenev
July 11, 2012 05:46PM
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

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Module development question regarding ngx_http_get_module_loc_conf

Aaron Bedra 1144 July 11, 2012 04:08PM

Re: Module development question regarding ngx_http_get_module_loc_conf

Valentin V. Bartenev 472 July 11, 2012 04:42PM

Re: Module development question regarding ngx_http_get_module_loc_conf

Aaron Bedra 577 July 11, 2012 05:02PM

Re: Module development question regarding ngx_http_get_module_loc_conf

Valentin V. Bartenev 626 July 11, 2012 05:46PM

Re: Module development question regarding ngx_http_get_module_loc_conf

Aaron Bedra 722 July 11, 2012 06:20PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 219
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready