sub_filter and proxy_pass

yuval.carmel@capriza.com nginx-forum at nginx.us
Sun Nov 15 11:39:42 UTC 2015


Hi,
I'm using Nginx 1.8 and trying to add a sub_filter but It fails to work (I
don't see the substitution happenning).


        location ~* \.(appcache|manifest)$ {
            expires -1;
            rewrite ^(/v[0-9]+/.*)$  /app_ver$1 break;
            rewrite ^(?!/v[0-9]+/)(.*)$  /app$1 break;
            proxy_set_header Accept-Encoding "";
            sub_filter 'CACHE' 'CACHE22';
            sub_filter_once on;
            proxy_pass http://static.dev.capriza.com.s3.amazonaws.com:80  ;
        }


You can see below that the sub_module is there:

root#2>&1 nginx -V | tr -- - '\n' | grep _module
http_ssl_module
http_realip_module
http_addition_module
http_sub_module
http_dav_module
http_flv_module
http_mp4_module
http_gunzip_module
http_gzip_static_module
http_random_index_module
http_secure_link_module
http_stub_status_module
http_auth_request_module
mail_ssl_module
http_spdy_module

Any idea what may be wrong here?

Tx,
Yuval

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,262829,262829#msg-262829



More information about the nginx mailing list