PHP code example of aymardkouakou / cakephp-cors-middleware
1. Go to this page and download the library: Download aymardkouakou/cakephp-cors-middleware library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
aymardkouakou / cakephp-cors-middleware example snippets
// In config/app.php
...
'debug' => filter_var(env('DEBUG', true), FILTER_VALIDATE_BOOLEAN),
...
// In src/Application.php
$middlewareQueue
...
->add(CorsMiddleware::class)
// OR
->add(new CorsMiddleware())
...