X-accel-redirect and gzip_static

I’m using x-accel-redirect to serve a file from a location that has
gzip_static on; however instead of the pre-gzipped version, I am
getting me the un-gzip’d version of the file. I assume that locations
are respected for x-accel-redirects targets, what am I missing / where
should I look for more details? Config snippet follows.

This is the canonical name which redirects to the x_accel_redirect

location
location ~
/dispatch/.*/(ric_sw_version|config.xml|employee.xml|config_data.xml))
{
gzip off;

fastcgi_pass webservices;
include include/fastcgi.conf;
fastcgi_intercept_errors off;
break;

}

this is the direct-route to the dispatched location

location /dispatch {
root /nutricate/static;
gzip_static on;
gzip_proxied any;
break;
}

this is the x_accel_redirect target where the canonical name redirects

to.
location /x_accel_redirect {
internal;
alias /nutricate/static/;
gzip_static on;
gzip_proxied any;
}
}

I’m experiencing the same problem. Have you managed to find a
workaround/fix?

Posted at Nginx Forum:

Redirect is very necessary, you could pass the weight

.

Posted at Nginx Forum: