Caching authenticated responses

Guillaume Quintard guillaume at varnish-software.com
Sun Oct 4 22:23:25 CEST 2015


Hi Anastasios,

This is totally feasible, look at the vcl_hash fonction in docs, it'll
allow to control what goes into the hash.
On Oct 4, 2015 21:41, "Anastasios Papadopoulos" <tpapad+varnish at gmail.com>
wrote:

> Is there some easy way to configure Varnish to cache authenticated
> responses?
> The concept is quite simple: the back-end is a REST API provider and the
> response payload is mostly cacheable (i.e. rarely changes). The API uses
> basic HTTP authentication which prevents default Varnish to cache it.
> However, since the user base is limited, I'd like Varnish to cache
> (meaning: respect the back-end caching headers, not blindly cache anything)
> using the authorization header as part of the hash / cache key. Is this
> even possible?
> Any sample VCL or pointers would be welcomed!
>
> Thank you very much!
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20151004/0b17e6ae/attachment.html>


More information about the varnish-misc mailing list