From 891bd6bd69d5ed99d175443fe52bee18a10b00b2 Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Thu, 17 May 2012 15:35:28 -0300 Subject: [PATCH] Ignore all cookies except the Noosfero one --- etc/noosfero/varnish-noosfero.vcl | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/etc/noosfero/varnish-noosfero.vcl b/etc/noosfero/varnish-noosfero.vcl index dd3c168..86e663c 100644 --- a/etc/noosfero/varnish-noosfero.vcl +++ b/etc/noosfero/varnish-noosfero.vcl @@ -1,7 +1,13 @@ - -backend default { - .host = "127.0.0.1"; - .port = "8080"; +sub vcl_recv { + if (req.http.Cookie) { + # We only care about the "_noosfero_session.*" cookie, used for + # authentication. + if (req.http.Cookie ~ "_noosfero_session.*" ) { + return (pass); + } + # Else strip all cookies + unset req.http.Cookie; + } } sub vcl_error { -- libgit2 0.21.2