From 593920ce81956f891188a652223dbb0502482d4a Mon Sep 17 00:00:00 2001 From: Konstantin Haase Date: Mon, 21 Jan 2013 21:18:16 +0100 Subject: [PATCH] add Pragma header for caches that do not understand Cache-Control, see #38 --- lib/travis/api/app/responders/image.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/travis/api/app/responders/image.rb b/lib/travis/api/app/responders/image.rb index cb2addd5..2c4c4f69 100644 --- a/lib/travis/api/app/responders/image.rb +++ b/lib/travis/api/app/responders/image.rb @@ -5,6 +5,7 @@ module Travis::Api::App::Responders end def apply + headers['Pragma'] = "no-cache" headers['Expires'] = Time.now.utc.httpdate headers['Content-Disposition'] = %(inline; filename="#{File.basename(filename)}") halt send_file(filename, type: :png)