question about addition filter

Igor Sysoev is at rambler-co.ru
Wed Jan 28 23:02:19 MSK 2009


On Wed, Jan 28, 2009 at 08:55:53PM +0100, Valery Kholodkov wrote:

> Probably this should work:
> 
> location /y {
>     add_before_body @x;
>     add_after_body @x;
> }

No, add_before_body does not support named locations.

> location @x {
>     proxy_pass http://www.yahoo.com;
> }
> 
> Mohammad Kolahdouzan wrote:
> >
> >Is it possible to have a configuration similar to the following:
> >
> >        location /x {
> >            proxy_pass http://www.yahoo.com;
> >        }
> >
> >        location /y {
> >            add_before_body /x;
> >            add_after_body  http://www.google.com;
> >        }
> >
> >which would supposedly add the content of the www.yahoo.com and 
> >www.google.com before and after the content of the page at 
> >/y/index.html? The addition filter module states that the texts after 
> >add_before_body and add_after_body are URI, but the above config doesn't 
> >seem to be doing it!


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





More information about the nginx mailing list