question about addition filter

Valery Kholodkov valery+nginxen at grid.net.ru
Wed Jan 28 22:55:53 MSK 2009


Probably this should work:

location /y {
     add_before_body @x;
     add_after_body @x;
}

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!

-- 
Regards,
Valery Kholodkov





More information about the nginx mailing list