Commit dc208696 authored by ale's avatar ale

Serve webhook on /

Get rid of the useless / handler and move /webhook in its place.
parent 69468cbd
......@@ -129,7 +129,7 @@ gitlab-docker-autodep \
```
You can then configure your project's webhooks with the URL
`http://localhost:14001/webhook`, with the *Trigger* checkbox set only
`http://localhost:14001/`, with the *Trigger* checkbox set only
on *Pipeline events*.
It can be useful to run the *rebuild* command from a cron job, for
......
......@@ -113,13 +113,7 @@ def run_app(gitlab_url, registry_hostname, gitlab_token,
app.run(host=bind_host, port=bind_port)
@app.route('/')
def app_index():
return make_response(
200, ['<html><body><h1>gitlab-docker-autodep</h1></body></html>'])
@app.route('/webhook', methods=('POST',))
@app.route('/', methods=('POST',))
def app_webhook():
# Authenticate the request, if configured to do so.
if app.config['WEBHOOK_AUTH_TOKEN']:
......
Markdown is supported
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