Fix headers

master
Mike Koch 6 years ago
parent a7546419a4
commit 878b2aa096
No known key found for this signature in database
GPG Key ID: 9BA5D7F8391455ED

@ -23,4 +23,17 @@ require_once(__DIR__ . '/../inc/custom_fields.inc.php');
// Load the ApplicationContext
$builder = new \DI\ContainerBuilder();
$applicationContext = $builder->build();
$applicationContext = $builder->build();
// Fix for getallheaders() on PHP-FPM and nginx
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;
}
}
Loading…
Cancel
Save