Skip to content

Commit

Permalink
disable session endpoint #304
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamed Nizar committed Dec 2, 2020
1 parent 59e3de5 commit 509b947
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions config/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@
*/
$routes->connect('/pages/*', ['controller' => 'Pages', 'action' => 'display']);



/**
* Connect catchall routes for all controllers.
*
Expand Down Expand Up @@ -203,16 +201,16 @@
});

// For restful session
Router::scope('/session', ['plugin' => 'Restful'], function ($routes) {
$routes->scope('/', ['controller' => 'Session'], function ($routes) {
$routes->extensions(['json']);

$routes->connect('/:key', ['action' => 'check', '_method' => 'CHECK'], ['pass' => ['key']]);
$routes->connect('/:key', ['action' => 'read', '_method' => 'GET'], ['pass' => ['key']]);
$routes->connect('/', ['action' => 'write', '_method' => 'POST']);
$routes->connect('/:key', ['action' => 'delete', '_method' => 'DELETE'], ['pass' => ['key']]);
});
});
// Router::scope('/session', ['plugin' => 'Restful'], function ($routes) {
// $routes->scope('/', ['controller' => 'Session'], function ($routes) {
// $routes->extensions(['json']);

// $routes->connect('/:key', ['action' => 'check', '_method' => 'CHECK'], ['pass' => ['key']]);
// $routes->connect('/:key', ['action' => 'read', '_method' => 'GET'], ['pass' => ['key']]);
// $routes->connect('/', ['action' => 'write', '_method' => 'POST']);
// $routes->connect('/:key', ['action' => 'delete', '_method' => 'DELETE'], ['pass' => ['key']]);
// });
// });

/**
* Load all plugin routes. See the Plugin documentation on
Expand Down

0 comments on commit 509b947

Please sign in to comment.