Skip to content

Commit 932c2be

Browse files
authored
[edit] parameters for ips
1 parent a8c398b commit 932c2be

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Controller/RibsCronController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ public function __construct(ParameterBagInterface $parameterBag)
3636
public function cron(Request $request)
3737
{
3838
$ip = $request->server->get('REMOTE_ADDR');
39-
$allowed_ip_external = explode(", ", $_ENV["IP_CRON_EXTERNAL"]);
39+
$allowed_ip_external = explode(", ", $this->getParameter("ribs_cron_ip_external"));
4040

41-
if (in_array($ip, $allowed_ip_external) || $ip === $_ENV["IP_CRON_INTERNAL"]) {
41+
if (in_array($ip, $allowed_ip_external) || $ip === $this->getParameter("ribs_cron_ip_internal")) {
4242
$this->crons = $this->getParameter("ribs_cron");
4343
$json_exec = $this->getCronFile();
4444
$now = new DateTime();
@@ -170,4 +170,4 @@ private function createRecursiveDirFromRoot($path)
170170

171171
return $new_path;
172172
}
173-
}
173+
}

0 commit comments

Comments
 (0)