From 25f67a1ce9c60c157bda8cf42116a7e373f5f138 Mon Sep 17 00:00:00 2001 From: Diogo Cordeiro Date: Fri, 26 Jun 2020 14:08:47 +0100 Subject: [PATCH] [ActivityPub][Inbox] get_all_headers was nginx only --- plugins/ActivityPub/actions/apinbox.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/ActivityPub/actions/apinbox.php b/plugins/ActivityPub/actions/apinbox.php index 04c4341e5e..ebce5360b1 100644 --- a/plugins/ActivityPub/actions/apinbox.php +++ b/plugins/ActivityPub/actions/apinbox.php @@ -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_') {