Tiny Patch to allow gzip_static in location-if

Maxim Dounin mdounin at mdounin.ru
Tue May 3 04:00:06 MSD 2011


Hello!

On Mon, May 02, 2011 at 09:56:36AM +0200, Andi Hechtbauer wrote:

> Hi,
> 
> to allow us to use gzip_static like this:
> 
> location /static {
>   root ...;
>   ...
>   if ( $arg_autogz ) {
>     gzip on;
>     gzip_static on;
>   }
> }
> 
> We use the attached trivial patch to
> src/http/modules/ngx_http_gzip_static_module.c
> 
> This may be useful to others, works in production, and might be
> included in the source?
> 
> Or is there an other/better way to achieve what we want there?

http://wiki.nginx.org/IfIsEvil

Maxim Dounin



More information about the nginx-devel mailing list