forked from thunix/www
Updated the body for rate limiting
This commit is contained in:
parent
52de48e5f3
commit
dd3a374135
|
@ -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);
|
||||
}
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue