From dd3a374135778ab6587a21ff7ac5a8da449dd658 Mon Sep 17 00:00:00 2001 From: Ubergeek Date: Sun, 17 Mar 2019 01:45:40 +0000 Subject: [PATCH] Updated the body for rate limiting --- githook.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/githook.php b/githook.php index 3c06093..792c263 100644 --- a/githook.php +++ b/githook.php @@ -26,10 +26,11 @@ syslog(LOG_INFO, 'Ansible Webhook recieved.'); if (time()-filemtime($lastrun) > 300) { exec("/etc/cron.hourly/ansible-pull"); touch ($lastrun); - echo "Ansible webhook recieved."; + echo "HTTP 200 - Ansible webhook recieved."; } else { http_response_code(429); + echo "HTTP 429 - Rate Limited."; exit(0); } ?>