A development engine based on Phalcon Framework.
Thanks the icon from Hrvoje Bielen
Add CORS support, you can define your own CORS support domains in the config.local.php:
<?php
return [
'cors' => [
[
'domain' => 'yourdomain1.com'
],
[
'domain' => 'yourdomain2.com'
]
]
];
You only need to add '_cors_enabled' => true
to the specified route. For example:
routes.frontend.php
<?php
return [
'/posts' => [
'module' => 'Information',
'controller' => 'PostController',
'action' => 'list',
'_cors_enabled' => true // inform that this API is supported with CORS
]
];
?>