From 992b7ed3223747b6e8076e6372fdc2dd46995a97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Eahin=20Akkaya?= Date: Sat, 29 Jan 2022 08:41:12 +0300 Subject: [PATCH] fix: Make the example code bettetr --- _posts/2022-01-04-build-and-deploy-automatically.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_posts/2022-01-04-build-and-deploy-automatically.md b/_posts/2022-01-04-build-and-deploy-automatically.md index 7b07738..f19ebe7 100644 --- a/_posts/2022-01-04-build-and-deploy-automatically.md +++ b/_posts/2022-01-04-build-and-deploy-automatically.md @@ -120,8 +120,8 @@ def index(): secret = bytes(config.APP_KEY, 'utf-8') digester = hmac.new(secret, content, hashlib.sha256) calculated_signature = 'sha256=' + digester.hexdigest() - signature = request.headers.get('X-Hub-Signature-256') - if calculated_signature == signature: + actual_signature = request.headers.get('X-Hub-Signature-256') + if calculated_signature == actual_signature: subprocess.Popen( ['./perform-git-pull.sh', config.PROJECT_PATH]) return 'OK'