fix(plugins): support both /plugins and /api/plugins routes behind reverse proxy
parent
7f0953b6d1
commit
de3bd7a93a
|
|
@ -13,7 +13,7 @@ use Symfony\Component\HttpFoundation\Response;
|
|||
use Symfony\Component\Routing\Attribute\Route;
|
||||
use Symfony\Component\Security\Http\Attribute\IsGranted;
|
||||
|
||||
#[Route('/api/plugins')]
|
||||
#[Route(path: '/{_prefix}plugins', requirements: ['_prefix' => '(api/)?'], defaults: ['_prefix' => ''])]
|
||||
#[IsGranted('ROLE_USER')]
|
||||
class PluginController extends AbstractController
|
||||
{
|
||||
|
|
@ -22,7 +22,7 @@ class PluginController extends AbstractController
|
|||
) {
|
||||
}
|
||||
|
||||
#[Route('', name: 'api_plugins_list', methods: ['GET'])]
|
||||
#[Route('', methods: ['GET'])]
|
||||
public function list(): JsonResponse
|
||||
{
|
||||
$plugins = $this->pluginRepository->findBy(['enabled' => true], ['name' => 'ASC']);
|
||||
|
|
|
|||
Loading…
Reference in New Issue