X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=index.php;h=9202cb84689badd4371e6f2f1e39d98cc6a4961f;hb=764d34a7d347d653414e5f5c632e02499edaef04;hp=1571df60c9fa6f6085e1e21021712f2c0d2d0fdb;hpb=1b8620b1ad4e2c647ff2d032c8e7c6687b6647a1;p=github%2Fshaarli%2FShaarli.git diff --git a/index.php b/index.php index 1571df60..9202cb84 100644 --- a/index.php +++ b/index.php @@ -597,8 +597,7 @@ function renderPage($conf, $pluginManager, $bookmarkService, $history, $sessionM // Get a fresh token if ($targetPage == Router::$GET_TOKEN) { - header('Content-Type:text/plain'); - echo $sessionManager->generateToken(); + header('Location: ./admin/token'); exit; } @@ -978,6 +977,7 @@ $app->group('', function () { $this->post('/admin/import', '\Shaarli\Front\Controller\Admin\ImportController:import'); $this->get('/admin/plugins', '\Shaarli\Front\Controller\Admin\PluginsController:index'); $this->post('/admin/plugins', '\Shaarli\Front\Controller\Admin\PluginsController:save'); + $this->get('/admin/token', '\Shaarli\Front\Controller\Admin\TokenController:getToken'); $this->get('/links-per-page', '\Shaarli\Front\Controller\Admin\SessionFilterController:linksPerPage'); $this->get('/visibility/{visibility}', '\Shaarli\Front\Controller\Admin\SessionFilterController:visibility');