Updated the body for rate limiting

This commit is contained in:
Ubergeek 2019-03-17 01:45:40 +00:00
parent 52de48e5f3
commit dd3a374135
1 changed files with 2 additions and 1 deletions

View File

@ -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);
}
?>