From 767887762903c69ea6b94080d7279bd70effc6a9 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 21 May 2021 20:17:02 +0200 Subject: [PATCH] Use /github as endpoint --- README-generator/nginx.conf | 2 +- README-generator/webhook.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README-generator/nginx.conf b/README-generator/nginx.conf index 3dd620c..529d59f 100644 --- a/README-generator/nginx.conf +++ b/README-generator/nginx.conf @@ -1,4 +1,4 @@ -location / { +location /github { # Force usage of https if ($scheme = http) { diff --git a/README-generator/webhook.py b/README-generator/webhook.py index b47393c..6f59915 100755 --- a/README-generator/webhook.py +++ b/README-generator/webhook.py @@ -5,10 +5,10 @@ from github_webhook import Webhook from flask import Flask from make_readme import generate_READMEs -app = Flask(__name__) # Standard Flask app -webhook = Webhook(app) # Defines '/postreceive' endpoint +app = Flask(__name__) -webhook.secret = open("github_webhook_secret", "r").read().strip() +github_webhook_secret = open("github_webhook_secret", "r").read().strip() +webhook = Webhook(app, endpoint="/github", secret=github_webhook_secret) login = open("login").read().strip() token = open("token").read().strip()