[ActivityPub][Inbox] get_all_headers was nginx only
This commit is contained in:
parent
e8dff6c4a0
commit
1db6943702
@ -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