From dc3e0c64954b1c0df4e770e2513199f3ed97de74 Mon Sep 17 00:00:00 2001 From: Hannes Giesenow Date: Wed, 27 Aug 2014 12:29:12 +0200 Subject: [PATCH] Added no-cache header This prevents Varnish from caching the captcha image --- Controller/CaptchaController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Controller/CaptchaController.php b/Controller/CaptchaController.php index 5cc45db..8d2fb1c 100644 --- a/Controller/CaptchaController.php +++ b/Controller/CaptchaController.php @@ -53,6 +53,7 @@ class CaptchaController extends Controller $response = new Response($generator->generate($options)); $response->headers->set('Content-type', 'image/jpeg'); + $response->headers->set('Pragma', 'no-cache'); return $response; }