[nginx] problem with a sample module
Igor Sysoev
igor at sysoev.ru
Tue Jun 1 10:42:36 MSD 2010
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/
More information about the nginx-devel
mailing list