diff --git a/lib/Controller/ExAppProxyController.php b/lib/Controller/ExAppProxyController.php index cdd9675a..78be5321 100644 --- a/lib/Controller/ExAppProxyController.php +++ b/lib/Controller/ExAppProxyController.php @@ -255,17 +255,16 @@ private function buildHeadersWithExclude(ExApp $exApp, string $exAppRoute, array break; } } - if (empty($headersToExclude)) { - return $headers; + if (!in_array('x-origin-ip', $headersToExclude)) { + $headersToExclude[] = 'x-origin-ip'; } + $headersToExclude[] = 'authorization-app-api'; foreach ($headers as $key => $value) { if (in_array(strtolower($key), $headersToExclude)) { unset($headers[$key]); } } - if (!isset($headers['X-Origin-IP'])) { - $headers['X-Origin-IP'] = $this->request->getRemoteAddress(); - } + $headers['X-Origin-IP'] = $this->request->getRemoteAddress(); return $headers; } }