forked from thunix/www
Hopefully, fixed again
This commit is contained in:
parent
c3fb5646d5
commit
53af670a4d
|
@ -20,14 +20,14 @@ $client_token = $data["secret"];
|
||||||
if ($client_token !== $access_token)
|
if ($client_token !== $access_token)
|
||||||
{
|
{
|
||||||
http_response_code(403);
|
http_response_code(403);
|
||||||
echo "HTTP 403 - Forbidden.";
|
echo "HTTP 403 - Forbidden, P1.";
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($remoteip !== $allowedip)
|
if ($remoteip !== $allowedip)
|
||||||
{
|
{
|
||||||
http_repsonse_code(403);
|
http_repsonse_code(403);
|
||||||
echo "HTTP 403 - Forbidden.";
|
echo "HTTP 403 - Forbidden, P2.";
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ if ($data["repository"]["full_name"] == 'thunix/ansible') {
|
||||||
}
|
}
|
||||||
elseif ($data["repository"]["full_name"] == 'thunix/www') {
|
elseif ($data["repository"]["full_name"] == 'thunix/www') {
|
||||||
syslog(LOG_INFO, 'WWW Webhook recieved.');
|
syslog(LOG_INFO, 'WWW Webhook recieved.');
|
||||||
if ( time () - filemtime ( $lastrun ) > $ratelimit ) {
|
if ( time () - filemtime ( $www_lastrun ) > $ratelimit ) {
|
||||||
touch ( $www_dropfile );
|
touch ( $www_dropfile );
|
||||||
touch ( $www_lastrun );
|
touch ( $www_lastrun );
|
||||||
http_response_code(200);
|
http_response_code(200);
|
||||||
|
|
Loading…
Reference in New Issue