mvc: backwards compatibility for Phalcon (https://github.com/opnsense/core/issues/6389), add missing getClientAddress

This commit is contained in:
Ad Schellevis 2024-05-21 18:03:41 +02:00
parent d5566b815c
commit 72120a6e09

View File

@ -141,4 +141,9 @@ class Request
{
return json_decode($this->getRawBody(), true) ?? false;
}
public function getClientAddress()
{
return explode(",", $_SERVER['REMOTE_ADDR'] ?? '')[0];
}
}