Requiring that SSL be used:
all actions to require a SSL-secured.
Limiting cross controller communication:
We can restrict which controller can
send request to this controller. We can also restrict which actions can send request
to this controller’s action.
Example
Make changes in the
config/routes.php
file as shown in the following program.
config/routes.php
use Cake\Core\Plugin;
use Cake\Routing\RouteBuilder;
use Cake\Routing\Router;
Router::defaultRouteClass('DashedRoute');
Router::scope('/', function (RouteBuilder $routes) {
$routes->connect('login',['controller'=>'Logins','action'=>'index']);
$routes->fallbacks('DashedRoute');
});
CakePHP
88
Plugin::routes();
Create a
Do'stlaringiz bilan baham: |