fix: 🐛 getCsrfIgnoredRoutes map all routes just once

This commit is contained in:
IceToast 2023-02-06 11:32:19 +01:00 committed by IceToast
parent 0b173fb428
commit f1de845554

View file

@ -51,13 +51,11 @@ class ExtensionHelper
$routes = array_merge($routes, $config['RoutesIgnoreCsrf']);
}
// add extension/ infront of every route
foreach ($routes as $key => $route) {
$routes[$key] = 'extensions/' . $route;
}
// map over the routes and add the extension name as prefix
$result = array_map(fn ($item) => "extensions/{$item}", $routes);
}
return $routes;
return $result;
}
/**