Merge branch 'fix-headers' into '3-2-5'
Fix headers See merge request mike-koch/Mods-for-HESK!84
This commit is contained in:
commit
f35fb7b207
@ -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