Fix headers
This commit is contained in:
parent
a7546419a4
commit
878b2aa096
@ -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…
x
Reference in New Issue
Block a user