Skip to content

Commit 073a2ba

Browse files
authored
feat(ExAppProxy): add X-Origin-IP header for rate-limiting purposes… (#351)
… for ExApp Signed-off-by: Andrey Borysenko <[email protected]>
1 parent b3b6e43 commit 073a2ba

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/Controller/ExAppProxyController.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,9 @@ private function buildHeadersWithExclude(ExApp $exApp, string $exAppRoute, array
263263
unset($headers[$key]);
264264
}
265265
}
266+
if (!isset($headers['X-Origin-IP'])) {
267+
$headers['X-Origin-IP'] = $this->request->getRemoteAddress();
268+
}
266269
return $headers;
267270
}
268271
}

0 commit comments

Comments
 (0)