diff --git a/Classes/Controller/AdministrationController.php b/Classes/Controller/AdministrationController.php index 373ce71..55f0f1f 100644 --- a/Classes/Controller/AdministrationController.php +++ b/Classes/Controller/AdministrationController.php @@ -26,6 +26,7 @@ use TYPO3\CMS\Core\Configuration\ExtensionConfiguration; use TYPO3\CMS\Core\Database\Connection; use TYPO3\CMS\Core\Database\ConnectionPool; +use TYPO3\CMS\Core\Http\AllowedMethodsTrait; use TYPO3\CMS\Core\Imaging\IconFactory; use TYPO3\CMS\Core\Imaging\IconSize; use TYPO3\CMS\Core\Localization\LanguageService; @@ -44,6 +45,8 @@ */ class AdministrationController extends ActionController { + use AllowedMethodsTrait; + protected int $pageUid = 0; protected array $indexerConfig = []; @@ -300,6 +303,11 @@ protected function statisticDetailsAction(string $pageHash): ResponseInterface return $view->renderResponse('Administration/StatisticDetails'); } + protected function initializeSaveStopwordsAction(): void + { + $this->assertAllowedHttpMethod($this->request, 'POST'); + } + /** * Save stop words */ @@ -391,6 +399,11 @@ protected function statisticAction(int $depth = 1, string $mode = 'overview'): R return $view->renderResponse('Administration/Statistic'); } + protected function initializeDeleteIndexedItemAction(): void + { + $this->assertAllowedHttpMethod($this->request, 'POST'); + } + /** * Remove item from index */ diff --git a/Resources/Private/Templates/Administration/Statistic.html b/Resources/Private/Templates/Administration/Statistic.html index e7fca4b..3190021 100644 --- a/Resources/Private/Templates/Administration/Statistic.html +++ b/Resources/Private/Templates/Administration/Statistic.html @@ -128,7 +128,7 @@