diff options
author | Jacob Vosmaer <jacob@gitlab.com> | 2016-08-19 20:10:41 +0300 |
---|---|---|
committer | Jacob Vosmaer <jacob@gitlab.com> | 2016-09-05 16:05:31 +0300 |
commit | c87540ed46ba8756154f767be99f80be75c27a43 (patch) | |
tree | 750f6f104743d49f93df191b656264211dba103e /lib/ci/api | |
parent | 89af76edc5e44ad1a0a55a65337bb992355911a6 (diff) |
Verify JWT messages from gitlab-workhorse
Diffstat (limited to 'lib/ci/api')
-rw-r--r-- | lib/ci/api/builds.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/ci/api/builds.rb b/lib/ci/api/builds.rb index 9f3b582a263..2b18ecef8ba 100644 --- a/lib/ci/api/builds.rb +++ b/lib/ci/api/builds.rb @@ -101,6 +101,7 @@ module Ci # POST /builds/:id/artifacts/authorize post ":id/artifacts/authorize" do require_gitlab_workhorse! + Gitlab::Workhorse.verify_api_request!(headers) not_allowed! unless Gitlab.config.artifacts.enabled build = Ci::Build.find_by_id(params[:id]) not_found! unless build @@ -113,7 +114,8 @@ module Ci end status 200 - { TempPath: ArtifactUploader.artifacts_upload_path } + content_type Gitlab::Workhorse::INTERNAL_API_CONTENT_TYPE + Gitlab::Workhorse.artifact_upload_ok end # Upload artifacts to build - Runners only |