From 191cbc164829db70588c9a6569eec981eb18becf Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Mon, 12 Jan 2015 16:17:13 -0200 Subject: [PATCH] varnish: don't leak HTTP cache headers to clients --- etc/noosfero/varnish-noosfero.vcl | 7 +++++++ 1 file changed, 7 insertions(+), 0 deletions(-) diff --git a/etc/noosfero/varnish-noosfero.vcl b/etc/noosfero/varnish-noosfero.vcl index 6ec0bca..8fd054f 100644 --- a/etc/noosfero/varnish-noosfero.vcl +++ b/etc/noosfero/varnish-noosfero.vcl @@ -10,6 +10,13 @@ sub vcl_recv { } } +sub vcl_deliver { + # Force clients to aways hit the server again for HTML pages + if (resp.http.Content-Type ~ "^text/html") { + set resp.http.Cache-Control = "no-cache"; + } +} + sub vcl_error { set obj.http.Content-Type = "text/html; charset=utf-8"; -- libgit2 0.21.2