Commit f8b91f7b authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

(Captiveportal, new) there's no place like (local)home

(cherry picked from commit 6ae824fc)
parent 85a2e27a
......@@ -82,9 +82,12 @@ class AccessController extends ApiControllerBase
private function getClientIp()
{
// determine orginal sender of this request
$trusted_proxy = array("127.0.0.1");
$trusted_proxy = array(); // optional, not implemented
if ($this->request->getHeader('X-Forwarded-For') != "" &&
(
explode('.', $this->request->getClientAddress())[0] == '127' ||
in_array($this->request->getClientAddress(), $trusted_proxy)
)
) {
// use X-Forwarded-For header to determine real client
return $this->request->getHeader('X-Forwarded-For');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment