[ActivityPub][Inbox] get_all_headers was nginx only
This commit is contained in:
parent
bc1af78bf7
commit
25f67a1ce9
|
@ -150,6 +150,11 @@ class apInboxAction extends ManagedAction
|
||||||
*/
|
*/
|
||||||
private function get_all_headers()
|
private function get_all_headers()
|
||||||
{
|
{
|
||||||
|
// If we're running on an Apache2 webserver
|
||||||
|
if (function_exists('getallheaders')) {
|
||||||
|
return getallheaders();
|
||||||
|
}
|
||||||
|
// Otherwise, do it manually.
|
||||||
$headers = [];
|
$headers = [];
|
||||||
foreach ($_SERVER as $name => $value) {
|
foreach ($_SERVER as $name => $value) {
|
||||||
if (substr($name, 0, 5) == 'HTTP_') {
|
if (substr($name, 0, 5) == 'HTTP_') {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user