{"id":23170326,"url":"https://github.com/palanik/lumen-cors","last_synced_at":"2025-08-28T08:18:20.987Z","repository":{"id":30594319,"uuid":"34149465","full_name":"palanik/lumen-cors","owner":"palanik","description":"CORS Middleware for Lumen micro-framework","archived":false,"fork":false,"pushed_at":"2018-04-09T13:01:23.000Z","size":7,"stargazers_count":101,"open_issues_count":8,"forks_count":30,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-19T15:10:01.392Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/palanik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-18T02:32:35.000Z","updated_at":"2024-01-03T14:08:29.000Z","dependencies_parsed_at":"2022-08-03T15:14:32.188Z","dependency_job_id":null,"html_url":"https://github.com/palanik/lumen-cors","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/palanik/lumen-cors","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palanik%2Flumen-cors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palanik%2Flumen-cors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palanik%2Flumen-cors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palanik%2Flumen-cors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/palanik","download_url":"https://codeload.github.com/palanik/lumen-cors/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palanik%2Flumen-cors/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272468519,"owners_count":24939743,"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-08-28T02:00:10.768Z","response_time":74,"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":[],"created_at":"2024-12-18T03:26:43.496Z","updated_at":"2025-08-28T08:18:20.969Z","avatar_url":"https://github.com/palanik.png","language":"PHP","funding_links":[],"categories":["Packages and Middleware"],"sub_categories":["Videos"],"readme":"Lumen-CORS\n==========\n\n[Cross-origin resource sharing](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS) (CORS) Middleware for [Lumen micro-framework](http://lumen.laravel.com/).\n\n[![Latest Stable Version](https://poser.pugx.org/palanik/lumen-cors/v/stable.svg)](https://packagist.org/packages/palanik/lumen-cors)\n[![License](https://poser.pugx.org/palanik/lumen-cors/license.svg)](https://github.com/palanik/lumen-cors/blob/master/LICENSE)\n\n## Installation ##\n\nAfter you install lumen as per [lumen docs](http://lumen.laravel.com/docs/installation#install-lumen), install lumen-cors from `lumen` folder.\n\n### Install with [Composer](https://packagist.org/packages/palanik/lumen-cors) ###\n\nRun `composer require \"palanik/lumen-cors:dev-master\"` to install lumen-cors.\n\n### Manual Installation ###\n\nCopy the file LumenCors.php into `app/Http/Middleware` directory.\n\n## Usage ##\n\n### Global CORS ###\n\nIf you want CORS enabled for every HTTP request to your application, simply list the middleware class `palanik\\lumen\\Middleware\\LumenCors` in the $app-\u003emiddleware() call of your `bootstrap/app.php` file. \n\n### CORS for Routes ###\n\nIf you would like to enable CORS to specific routes, you should first assign the `lumen-cors` middleware a short-hand key in your `bootstrap/app.php` file.\n\n```php\n$app-\u003erouteMiddleware([\n    'cors' =\u003e 'palanik\\lumen\\Middleware\\LumenCors',\n]);\n```\n\nThen, you use the key in the route options array.\n```php\n$app-\u003eget('/data', ['middleware' =\u003e 'cors', function() {\n    //\n}]);\n```\n\nMore info. - http://lumen.laravel.com/docs/middleware#registering-middleware\n\n## License ##\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpalanik%2Flumen-cors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpalanik%2Flumen-cors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpalanik%2Flumen-cors/lists"}