forked from thunix/www
Update key
This commit is contained in:
parent
bb10added4
commit
55d45c5a40
|
@ -3,7 +3,7 @@
|
||||||
/* gitea deploy webhook */
|
/* gitea deploy webhook */
|
||||||
|
|
||||||
/* security */
|
/* security */
|
||||||
$access_token = '1234567890';
|
$access_token = 'abcdefghijklmnop';
|
||||||
$ansible_lastrun = '/dev/shm/ansible-hook-last-run';
|
$ansible_lastrun = '/dev/shm/ansible-hook-last-run';
|
||||||
$ansible_dropfile = '/dev/shm/run-ansible';
|
$ansible_dropfile = '/dev/shm/run-ansible';
|
||||||
$www_lastrun = '/dev/shm/www-hook-last-run';
|
$www_lastrun = '/dev/shm/www-hook-last-run';
|
||||||
|
@ -17,7 +17,7 @@ $json = file_get_contents('php://input');
|
||||||
$data = json_decode($json, true);
|
$data = json_decode($json, true);
|
||||||
|
|
||||||
$client_token = $data["secret"];
|
$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, P1.";
|
echo "HTTP 403 - Forbidden, P1.";
|
||||||
|
|
Loading…
Reference in New Issue