diff --git a/deploy.php b/deploy.php index 0feeb4f..85f5bdc 100644 --- a/deploy.php +++ b/deploy.php @@ -164,6 +164,18 @@ function endScript() { // The branch $branch = ''; +if (!function_exists('getallheaders')) { + function getallheaders() { + $headers = []; + foreach ($_SERVER as $name => $value) { + if (substr($name, 0, 5) == 'HTTP_') { + $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value; + } + } + return $headers; + } +} + // Process request headers $headers = getallheaders(); if(isset($headers['X-Event-Key'])) {