Commit 6f316c09 authored by Thomas Schneider's avatar Thomas Schneider
Browse files

Check for GitLab token

parent 1f7b9f5e
Pipeline #1649 failed with stage
in 28 seconds
---
issue_tag: RT
token:
rt:
server: https://rt.example.org/
user: gl-bridge
......
......@@ -16,6 +16,9 @@ rt = RT_Client.new(server: settings.rt[:server],
cookies: settings.rt[:cookies])
post '/' do # rubocop:disable Metrics/BlockLength
if not settings.token.nil?
halt 403 unless request.env['HTTP_X_GITLAB_TOKEN'] == settings.token
end
gitlab_event = request.env['HTTP_X_GITLAB_EVENT']
case gitlab_event
when 'Push Hook'
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment