[ActivityPub][Inbox] get_all_headers was nginx only

This commit is contained in:
Diogo Cordeiro 2020-06-26 14:08:47 +01:00 committed by Diogo Peralta Cordeiro
parent bc1af78bf7
commit 25f67a1ce9
1 changed files with 5 additions and 0 deletions

View File

@ -150,6 +150,11 @@ class apInboxAction extends ManagedAction
*/
private function get_all_headers()
{
// If we're running on an Apache2 webserver
if (function_exists('getallheaders')) {
return getallheaders();
}
// Otherwise, do it manually.
$headers = [];
foreach ($_SERVER as $name => $value) {
if (substr($name, 0, 5) == 'HTTP_') {