I am unable to purge objects in varnish using CURL
CURL command: curl -X PURGE localhost/public/stylesheets/main.css -v the curl command is returning 200 OK response. the object is not getting purged
config file in VARNISH : default.vcl
sub vcl_miss {
if (req.request == "PURGE") {
purge;
error 404 "Not in cache.";
}
if (req.http.user-agent ~ "spider") {
error 503 "Not presently in cache";
}
return (fetch);
}
sub vcl_hit {
if (req.request == "PURGE") {
purge;
error 200 "Purged.";
}
return (deliver);
}
sub vlc.recv{
if (req.request == "PURGE") {
if (!client.ip ~ purge) {
error 405 "Not allowed.";
}
return(lookup);
}
}
Kindly, help on this