Skip to content
Snippets Groups Projects
Commit a2931875 authored by ale's avatar ale
Browse files

Fixed typo (request.header -> request.headers)

parent dc208696
No related branches found
No related tags found
No related merge requests found
...@@ -117,12 +117,12 @@ def run_app(gitlab_url, registry_hostname, gitlab_token, ...@@ -117,12 +117,12 @@ def run_app(gitlab_url, registry_hostname, gitlab_token,
def app_webhook(): def app_webhook():
# Authenticate the request, if configured to do so. # Authenticate the request, if configured to do so.
if app.config['WEBHOOK_AUTH_TOKEN']: if app.config['WEBHOOK_AUTH_TOKEN']:
token = request.header.get('X-Gitlab-Token') token = request.headers.get('X-Gitlab-Token')
if token != app.config['WEBHOOK_AUTH_TOKEN']: if token != app.config['WEBHOOK_AUTH_TOKEN']:
abort(401) abort(401)
# Ignore non-pipeline events. # Ignore non-pipeline events.
ev_type = request.header.get('X-Gitlab-Event') ev_type = request.headers.get('X-Gitlab-Event')
if ev_type != 'Pipeline Hook': if ev_type != 'Pipeline Hook':
app.logger.info('ignored non-pipeline event with type %s' % ev_type) app.logger.info('ignored non-pipeline event with type %s' % ev_type)
return make_response(200, ['{}']) return make_response(200, ['{}'])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment