FIX: Auth missing from some routes
This commit is contained in:
@ -1,2 +1,2 @@
|
||||
<?php
|
||||
//$app->add($app->getContainer()->get(Incoviba\Middleware\Authentication::class));
|
||||
$app->add($app->getContainer()->get(Incoviba\Middleware\Authentication::class));
|
||||
|
@ -46,10 +46,16 @@ class Authentication
|
||||
|
||||
$valid_paths = [
|
||||
'/',
|
||||
'/api'
|
||||
];
|
||||
if (in_array($current_path, $valid_paths, true)) {
|
||||
return true;
|
||||
}
|
||||
foreach ($valid_paths as $path) {
|
||||
if (str_starts_with($current_path, $path)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
$valid_uris = [
|
||||
$this->login_url,
|
||||
];
|
||||
|
Reference in New Issue
Block a user