Commit 1b12782b authored by Tino Goratsch's avatar Tino Goratsch

improved the previous commit

parent df11e522
......@@ -71,7 +71,11 @@ class ControllerActionDispatcher
}
if ($this->request->getArea() === AreaEnum::AREA_WIDGET &&
$this->request->getServer()->get('REMOTE_ADDR') !== '127.0.0.1') {
!in_array(
$this->request->getServer()->get('REMOTE_ADDR'),
$this->request->getSymfonyRequest()->getTrustedProxies()
)
) {
throw new \RuntimeException('Loading widgets from outside is not allowed!');
}
......
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