FIX: Toku external
This commit is contained in:
@ -29,7 +29,7 @@ return [
|
|||||||
],
|
],
|
||||||
'externalPaths' => [
|
'externalPaths' => [
|
||||||
'/api/external' => [
|
'/api/external' => [
|
||||||
'/toku' => $_ENV['TOKU_TOKEN']
|
'/toku/success' => $_ENV['TOKU_TOKEN']
|
||||||
],
|
],
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
@ -71,11 +71,11 @@ class API
|
|||||||
{
|
{
|
||||||
$uri = $request->getUri();
|
$uri = $request->getUri();
|
||||||
foreach ($this->externalPaths as $basePath => $paths) {
|
foreach ($this->externalPaths as $basePath => $paths) {
|
||||||
if (!str_starts_with($uri->getPath(), $basePath)) {
|
if (!str_starts_with($uri->getPath(), strtolower($basePath))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
foreach ($paths as $subPath) {
|
foreach ($paths as $subPath => $key) {
|
||||||
$fullPath = "{$basePath}{$subPath}";
|
$fullPath = strtolower("{$basePath}{$subPath}");
|
||||||
if ($uri->getPath() === $fullPath) {
|
if ($uri->getPath() === $fullPath) {
|
||||||
return $this->validateExternalKey($request, $basePath, $subPath);
|
return $this->validateExternalKey($request, $basePath, $subPath);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user