Welcome! Log In Create A New Profile

Advanced

Re: Module development question regarding ngx_http_get_module_loc_conf

Aaron Bedra
July 11, 2012 06:20PM
On Jul 11, 2012, at 4:45 PM, Valentin V. Bartenev wrote:

> 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().

Thanks!

> Btw, if the purpose of your module is to add header, then it's better to develop
> a header filter.

I was unsure of that when I was reading things. I'll investigate this option as well.

> Also note, that is_abuser() blocks nginx process.

Yeah, I figured. I need to find a better way to do that. That's my plan after the module is working properly otherwise. Thanks again for your help!

Cheers,

Aaron
_______________________________________________
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 1141 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 575 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 721 July 11, 2012 06:20PM



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

Online Users

Guests: 240
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