Welcome! Log In Create A New Profile

Advanced

Re: [nginx] problem with a sample module

June 01, 2010 02:44AM
On Tue, Jun 01, 2010 at 08:36:05AM +0200, Jérôme Loyet wrote:

> Hi,
>
> I'm writing a very simple module which add a header.
>
> In the postconfigure function, I backup up ngx_http_top_header_filter
> and set my own filter instead.
>
> static ngx_int_t
> ngx_http_xtoken_init(ngx_conf_t *cf)
> {
> ngx_http_next_header_filter = ngx_http_top_header_filter;
> ngx_http_top_header_filter = ngx_http_xtoken_clear_cookie_handler;
> return NGX_OK;
> }
>
> But the function ngx_http_xtoken_filter seems to be never called.
>
> The module is compile with --add-module=/path/to/module
>
> do you have any clue of what I did wrong ?

In /path/to/module/config you should change:

- HTTP_MODULES="$HTTP_MODULES ngx_http_xtoken_module"
+ HTTP_AUX_FILTER_MODULES="$HTTP_AUX_FILTER_MODULES ngx_http_xtoken_module"


--
Igor Sysoev
http://sysoev.ru/en/

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

[nginx] problem with a sample module

Jérôme Loyet 4126 June 01, 2010 02:38AM

Re: [nginx] problem with a sample module

Igor Sysoev 1251 June 01, 2010 02:44AM

Re: [nginx] problem with a sample module

Jérôme Loyet 1088 June 01, 2010 03:26AM

Re: [nginx] problem with a sample module

Jérôme Loyet 1223 June 01, 2010 04:42AM

Re: [nginx] problem with a sample module

agentzh 1088 June 01, 2010 05:00AM

Re: [nginx] problem with a sample module

Jérôme Loyet 1404 June 01, 2010 05:04AM



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

Online Users

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