Skip to content

Commit

Permalink
feat(ExAppProxy): add X-Origin-IP header for rate-limiting purposes… (
Browse files Browse the repository at this point in the history
#351)

… for ExApp

Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
  • Loading branch information
andrey18106 authored Aug 5, 2024
1 parent b3b6e43 commit 073a2ba
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Controller/ExAppProxyController.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,9 @@ private function buildHeadersWithExclude(ExApp $exApp, string $exAppRoute, array
unset($headers[$key]);
}
}
if (!isset($headers['X-Origin-IP'])) {
$headers['X-Origin-IP'] = $this->request->getRemoteAddress();
}
return $headers;
}
}

0 comments on commit 073a2ba

Please sign in to comment.