FRiCKLE / ngx_cache_purge

nginx module which adds ability to purge content from FastCGI, proxy, SCGI and uWSGI caches.
http://labs.frickle.com/nginx_ngx_cache_purge/
Other
1.06k stars 311 forks source link

Impossible to purge URL with Query String. #61

Closed andreapernici closed 6 years ago

andreapernici commented 6 years ago

Following the readme configuration of fastcgi_cache I noticed that purge is not working in case of querystring.

Is there a way to solve this?

andreapernici commented 6 years ago

Ok solved

        location ~ /purge_api(/.*) {

            if ($query_string) {
                set $qstr '?';
            }
            fastcgi_cache_purge API "$scheme$request_method$host$1$qstr$query_string";
        }