{"id":33978091,"url":"https://github.com/aymeekouakou/cakephp-cors-middleware","last_synced_at":"2025-12-13T02:41:36.020Z","repository":{"id":62490690,"uuid":"183253667","full_name":"aymeekouakou/cakephp-cors-middleware","owner":"aymeekouakou","description":"A CakePHP (3.7+) middleware for activate cors domain in your application.","archived":false,"fork":false,"pushed_at":"2020-01-25T16:14:23.000Z","size":35,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-30T15:22:06.263Z","etag":null,"topics":["cakephp","cakephp3","cors","middleware","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aymeekouakou.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-24T15:10:46.000Z","updated_at":"2021-01-15T10:26:11.000Z","dependencies_parsed_at":"2022-11-02T11:02:52.586Z","dependency_job_id":null,"html_url":"https://github.com/aymeekouakou/cakephp-cors-middleware","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/aymeekouakou/cakephp-cors-middleware","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aymeekouakou%2Fcakephp-cors-middleware","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aymeekouakou%2Fcakephp-cors-middleware/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aymeekouakou%2Fcakephp-cors-middleware/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aymeekouakou%2Fcakephp-cors-middleware/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aymeekouakou","download_url":"https://codeload.github.com/aymeekouakou/cakephp-cors-middleware/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aymeekouakou%2Fcakephp-cors-middleware/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27698852,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-13T02:00:09.769Z","response_time":147,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cakephp","cakephp3","cors","middleware","php"],"created_at":"2025-12-13T02:41:34.456Z","updated_at":"2025-12-13T02:41:36.013Z","avatar_url":"https://github.com/aymeekouakou.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.com/aymeekouakou/cakephp-cors-middleware.svg?branch=master)](https://travis-ci.com/aymeekouakou/cakephp-cors-middleware)\n\nA CakePHP (3.7+) middleware for activate cors domain in your application. [Middleware docs](https://book.cakephp.org/3.0/en/controllers/middleware.html).\n\n[Learn more about CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS)\n\n## Requirements\n\n- PHP version 7.2 or higher\n- CakePhp 3.7 or higher\n\n## Installation\n\nYou can install this plugin into your CakePHP application using [composer](http://getcomposer.org).\n\nThe recommended way to install composer packages is:\n\n```bash\ncomposer require aymardkouakou/cakephp-cors-middleware\n```\n\nEnsure that debug mode is activated:\n```php\n// In config/app.php\n\n...\n\n'debug' =\u003e filter_var(env('DEBUG', true), FILTER_VALIDATE_BOOLEAN),\n\n...\n```\n\n## Quick Start\n\nAdding the Middleware:\n\n```php\n// In src/Application.php\n\n$middlewareQueue\n\n    ...\n    \n    -\u003eadd(CorsMiddleware::class)\n    // OR \n    -\u003eadd(new CorsMiddleware())\n    \n    ...\n    \n```\n\nBy default the middleware authorize cors for all origins, all methods and all headers. No configuration required for work fine.\n\n## Custom configuration\n\nFor using custom configuration, you must adding a ````Cors```` array in your ````config/app.php```` file.\n\n````php\n'Cors' =\u003e [\n\n    // Authorized options here\n    \n    'AllowOrigin' =\u003e string|array,\n    'AllowMethods' =\u003e array,\n    'AllowHeaders' =\u003e array,\n    'ExposeHeaders' =\u003e array,\n    'AllowCredentials' =\u003e true|false,\n    'Maxge' =\u003e int\n    \n]\n````\n\n## Authorized options\n\n#### Allow all domains\n \n````php\n'AllowOrigin' =\u003e '*'\n// Or\n'AllowOrigin' =\u003e ['*']\n````\n\n#### Allow one domain only\n \n````php\n'AllowOrigin' =\u003e 'localhost:4200'\n````\n\n#### Allow multiple domains\n \n````php\n'AllowOrigin' =\u003e [\n    'localhost:4200',\n    ...\n]\n````\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faymeekouakou%2Fcakephp-cors-middleware","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faymeekouakou%2Fcakephp-cors-middleware","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faymeekouakou%2Fcakephp-cors-middleware/lists"}