summaryrefslogtreecommitdiff
path: root/lib/gitlab/workhorse.rb
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2016-08-18 16:31:44 +0200
committerJacob Vosmaer <jacob@gitlab.com>2016-12-15 12:26:36 +0100
commit6731ab5d76c34462f0b4424ff03c9646ad916b76 (patch)
tree0fc3f62485f5dfdf36d02e6407bba7640ea87aef /lib/gitlab/workhorse.rb
parent01ffcceb81f1a556cdce15ec89c15be12dba9732 (diff)
downloadgitlab-ce-6731ab5d76c34462f0b4424ff03c9646ad916b76.tar.gz
Add Gitlab::Middleware::Multipart
Diffstat (limited to 'lib/gitlab/workhorse.rb')
-rw-r--r--lib/gitlab/workhorse.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/workhorse.rb b/lib/gitlab/workhorse.rb
index 594439a5d4b..aeb1a26e1ba 100644
--- a/lib/gitlab/workhorse.rb
+++ b/lib/gitlab/workhorse.rb
@@ -117,8 +117,12 @@ module Gitlab
end
def verify_api_request!(request_headers)
+ decode_jwt(request_headers[INTERNAL_API_REQUEST_HEADER])
+ end
+
+ def decode_jwt(encoded_message)
JWT.decode(
- request_headers[INTERNAL_API_REQUEST_HEADER],
+ encoded_message,
secret,
true,
{ iss: 'gitlab-workhorse', verify_iss: true, algorithm: 'HS256' },