problem with echo_before when proxying a server which sends gzipped content

Yichun Zhang (agentzh) agentzh at gmail.com
Tue Apr 29 19:25:29 UTC 2014


Hello!

On Thu, Apr 3, 2014 at 8:14 AM, Carsten Germer wrote:
> yes, it works with suppressing gzip between nginx and source-server with "proxy_set_header Accept-Encoding "deflate";"
> Thanks a bunch!
> I was aiming for a solution that preserves the gzip-compression between source and cache, but I'm caching long time, anyway.
>
>> add_before_body / add_after_body
> I did look at those before but I'd still have to find a way to get the $arg_callback to the URIs and output them with echo for the whole solution.

As the author of both the ngx_echo and ngx_xss modules, I'd recommend
ngx_xss module for your JSONP use case:

    https://github.com/openresty/xss-nginx-module#readme

It should be a bit faster and also safer for this very case.

Regards,
-agentzh



More information about the nginx mailing list