summaryrefslogtreecommitdiff
path: root/app/controllers/ci/projects_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/ci/projects_controller.rb')
-rw-r--r--app/controllers/ci/projects_controller.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/ci/projects_controller.rb b/app/controllers/ci/projects_controller.rb
index d1824b481d7..081e01a75e0 100644
--- a/app/controllers/ci/projects_controller.rb
+++ b/app/controllers/ci/projects_controller.rb
@@ -3,6 +3,7 @@ module Ci
before_action :project
before_action :authorize_read_project!, except: [:badge]
before_action :no_cache, only: [:badge]
+ skip_before_action :authenticate_user!, only: [:badge]
protect_from_forgery
def show
@@ -18,6 +19,7 @@ module Ci
#
def badge
return render_404 unless @project
+
image = Ci::ImageForBuildService.new.execute(@project, params)
send_file image.path, filename: image.name, disposition: 'inline', type:"image/svg+xml"
end