From c5cb06676eeb80f205bbfbabf9d9e7917bc6f5f9 Mon Sep 17 00:00:00 2001 From: Ubergeek Date: Fri, 22 Mar 2019 00:34:33 +0000 Subject: [PATCH] Ok, giving up, splitting the hooks --- ansible-hook.php | 46 ++++++++++++++++++++++++++++++++++++++++++++++ www-hook.php | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 ansible-hook.php create mode 100644 www-hook.php diff --git a/ansible-hook.php b/ansible-hook.php new file mode 100644 index 0000000..090d0ac --- /dev/null +++ b/ansible-hook.php @@ -0,0 +1,46 @@ + $ratelimit ) { + touch ( $www_dropfile ); + touch ( $www_lastrun ); + echo "HTTP 200 - WWW webhook recieved."; + die(); + } + else { + http_response_code(429); + echo "HTTP 429 - Rate Limited."; + die(); + } + die(); + +?> diff --git a/www-hook.php b/www-hook.php new file mode 100644 index 0000000..e1787a3 --- /dev/null +++ b/www-hook.php @@ -0,0 +1,46 @@ + $ratelimit ) { + touch ( $ansible_dropfile ); + touch ( $ansible_lastrun ); + echo "HTTP 200 - Ansible webhook recieved."; + die(); + } + else { + http_response_code(429); + echo "HTTP 429 - Rate Limited."; + die(); + } + die(); + +?>