fix: 🐛 getCsrfIgnoredRoutes map all routes just once
This commit is contained in:
parent
9b193c74dd
commit
ef5c063b09
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue