fix: 🐛 getCsrfIgnoredRoutes map all routes just once

This commit is contained in:
IceToast 2023-02-06 11:32:19 +01:00
parent 9b193c74dd
commit 33cc108900
No known key found for this signature in database
GPG key ID: 1464353E063A5B97

View file

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