From 65267795f1193aad9a07b0bc650f64fb58408dfc Mon Sep 17 00:00:00 2001 From: Henrik Hodne Date: Sat, 26 Oct 2013 08:19:01 -0500 Subject: [PATCH] Only allow image responses for repositories --- lib/travis/api/app/responders/image.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/travis/api/app/responders/image.rb b/lib/travis/api/app/responders/image.rb index c6c6a17d..44a37faa 100644 --- a/lib/travis/api/app/responders/image.rb +++ b/lib/travis/api/app/responders/image.rb @@ -11,6 +11,10 @@ module Travis::Api::App::Responders send_file(filename, type: :png, last_modified: last_modified) end + def apply? + super && resource.is_a?(Repository) + end + private def content_type