diff options
author | Jacob Vosmaer <jacob@gitlab.com> | 2016-08-18 17:31:44 +0300 |
---|---|---|
committer | Jacob Vosmaer <jacob@gitlab.com> | 2016-12-15 14:26:36 +0300 |
commit | 6731ab5d76c34462f0b4424ff03c9646ad916b76 (patch) | |
tree | 0fc3f62485f5dfdf36d02e6407bba7640ea87aef /lib/gitlab/workhorse.rb | |
parent | 01ffcceb81f1a556cdce15ec89c15be12dba9732 (diff) |
Add Gitlab::Middleware::Multipart
Diffstat (limited to 'lib/gitlab/workhorse.rb')
-rw-r--r-- | lib/gitlab/workhorse.rb | 6 |
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' }, |