mirror of
https://github.com/ThunixdotNet/www.git
synced 2026-01-23 23:10:17 +00:00
Updated the body for rate limiting
This commit is contained in:
@@ -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);
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user