From dc20869668759c0d6c50257313869adb0c5d09d4 Mon Sep 17 00:00:00 2001
From: ale <ale@incal.net>
Date: Sun, 21 Oct 2018 10:46:49 +0100
Subject: [PATCH] Serve webhook on /

Get rid of the useless / handler and move /webhook in its place.
---
 README.md                       | 2 +-
 gitlab_docker_autodep/server.py | 8 +-------
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/README.md b/README.md
index 533f6aa..d654c3b 100644
--- a/README.md
+++ b/README.md
@@ -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
diff --git a/gitlab_docker_autodep/server.py b/gitlab_docker_autodep/server.py
index 1273f88..d9a8143 100644
--- a/gitlab_docker_autodep/server.py
+++ b/gitlab_docker_autodep/server.py
@@ -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']:
-- 
GitLab