[Varnish] #1683: varnishncsa should log the last value in vcl sub

Varnish varnish-bugs at varnish-cache.org
Fri Feb 27 17:19:49 CET 2015


#1683: varnishncsa should log the last value in vcl sub
-----------------------+---------------------
 Reporter:  razvanphp  |       Owner:  aondio
     Type:  defect     |      Status:  new
 Priority:  normal     |   Milestone:
Component:  build      |     Version:  4.0.3
 Severity:  normal     |  Resolution:
 Keywords:             |
-----------------------+---------------------

Comment (by razvanphp):

 I'm using a slightly modified version of devicedetect.vcl from
 https://docs.fastly.com/guides/caching/how-do-i-deliver-different-content-
 to-different-devices

 and then in my vcl:


 {{{

 ...
 include "inc_devicedetect.vcl";
 ...
 sub vcl_recv {
     ...
     # Mobile and locale redirects
     call detect_device;
     if (req.http.X-UA-Device ~ "(smartphone|mobile)") {
         return(synth(702, "http://m.site.com" + req.url));
     }
     ...
 }

 sub vcl_synth {
     if (resp.status == 702) {
         # temporary redirect
         set resp.http.Location = resp.reason;
         set resp.status = 302;
         return(deliver);
     }
 }
 }}}

-- 
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1683#comment:5>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator



More information about the varnish-bugs mailing list