mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
add config check
This commit is contained in:
parent
61b520fdef
commit
e0aa06744e
@ -67,6 +67,7 @@ Router::scope('/', function (RouteBuilder $routes) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
$allowedCaller = Configure::read('API.allowedCaller');
|
$allowedCaller = Configure::read('API.allowedCaller');
|
||||||
|
if($allowedCaller && count($allowedCaller) > 0) {
|
||||||
$callerIp = $request->clientIp();
|
$callerIp = $request->clientIp();
|
||||||
foreach($allowedCaller as $allowed) {
|
foreach($allowedCaller as $allowed) {
|
||||||
$ip = gethostbyname($allowed);
|
$ip = gethostbyname($allowed);
|
||||||
@ -74,6 +75,7 @@ Router::scope('/', function (RouteBuilder $routes) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Register scoped middleware for in scopes.
|
// Register scoped middleware for in scopes.
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
Subproject commit a04d4769974b9d93ba72e490ed7dca3fbaed768c
|
Subproject commit 21d4a0a5e9a19f251e26c0ae07ce74be2fa99bbf
|
||||||
Loading…
x
Reference in New Issue
Block a user