[prev in list] [next in list] [prev in thread] [next in thread] 

List:       varnish-bugs
Subject:    [Varnish] #1270: Any way to detect/distinguish  ESI requests?
From:       "Varnish" <varnish-bugs () varnish-cache ! org>
Date:       2013-02-26 12:06:54
Message-ID: 046.c9b37f3467e6d6c2b4aa0b0321021a52 () varnish-cache ! org
[Download RAW message or body]

#1270: Any way to detect/distinguish  ESI requests?
----------------------+-------------------------
 Reporter:  whocares  |       Type:  enhancement
   Status:  new       |   Priority:  normal
Milestone:            |  Component:  varnishd
  Version:  3.0.3     |   Severity:  normal
 Keywords:            |
----------------------+-------------------------
 While playing with ESI I found that there seems to be no way to make
 Varnish distinguish between internal ESI and normal (= coming from a user)
 requests in vcl_recv(). What I'm trying to do is to add a special header
 and probably other stuff in a way like this:

 {{{
   if (req.isesi) {
      set req.http.X-Esi = "<nonce/hash/secret>";
   }
 }}}

 to any ESI requests so that the snippet to be included can actually make
 sure it was called through ESI processing and not directly by a user. I
 tried looking in the docs and also tried modifying the req.http. Headers
 for the ESI enabled pages in vcl_recv() as well as vcl_fetch() in the hope
 that the ESI requests would copy the headers from the original request but
 no luck there.
 Maybe I've done something wrong there but in any case I'd think that being
 able to detect ESI requests directly would be a much cleaner approach.

 -Stefan

-- 
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1270>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic