About this:<div> <div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote">
<div> location /proxied-stuff {</div><div> proxy_set_header Accept-Encoding gzip;</div><div> proxy_cache_key "$scheme$host$request_uri";</div><div> proxy_cache_valid 2d;</div>
<div> proxy_cache myapp_cache;</div><div> proxy_pass <a href="http://127.0.0.1:85" target="_blank">http://127.0.0.1:85</a>;</div><div> }</div></div></blockquote></div><br>
</div><div>I was hoping that gunzip'ping for clients that don't support compression would be as simple as adding the following inside the above block:</div><div><br></div><div><div> if ($http_accept_encoding !~* gzip) {</div>
<div> gunzip on;</div><div> }</div></div><div><br></div><div>But when nginx configuration is reloaded, I get: "nginx: [emerg] "gunzip" directive is not allowed here".</div><div><br>
</div><div>I suppose I could rewrite the request to an internal location, then within that location's block re-set the proxy_cache_key accordingly. But perhaps there's an easier way?</div><div><br></div><div>Massimiliano</div>
<div><br></div>