Hi there,
While reading the docs, I found this in https://www.varnish-software.com/wiki/content/tutorials/varnish/sample_vclTe mplate.html : HANDLING HTTP PURGE sub vcl_purge { # Only handle actual PURGE HTTP methods, everything else is discarded if (req.method != "PURGE") { # restart request set req.http.X-Purge = "Yes"; return(restart); } } But in mattiasgeniar/varnish-4.0-configuration-templates https://github.com/mattiasgeniar/varnish-4.0-configuration-templates/blob/ma ster/default.vcl This is just the opposite logic : sub vcl_purge { # Only handle actual PURGE HTTP methods, everything else is discarded if (req.method == "PURGE") { # restart request set req.http.X-Purge = "Yes"; return (restart); } } So I assume the latter, wiki page, has a typo ?! Last, in https://book.varnish-software.com/4.0/chapters/Cache_Invalidation.html , after similar vcl_recv conditions than above to return purge, vcl_purge subroutine sets req.method instead of req.http.X-Purge : sub vcl_purge { set req.method = "GET"; return (restart); } Sounds logical to change req.method to avoid infinite loops, so why isn't it the same in above examples ? Thank you !
_______________________________________________ varnish-misc mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
