{"id":23806949,"url":"https://github.com/havenshen/slim-cors","last_synced_at":"2025-09-06T17:31:19.566Z","repository":{"id":62515115,"uuid":"86030013","full_name":"HavenShen/Slim-Cors","owner":"HavenShen","description":"This repository contains a Slim Framework CORS middleware.","archived":false,"fork":false,"pushed_at":"2017-03-24T09:01:21.000Z","size":15,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-20T07:41:22.602Z","etag":null,"topics":["cors","framework","middleware","slim"],"latest_commit_sha":null,"homepage":null,"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/HavenShen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-24T05:18:43.000Z","updated_at":"2018-07-10T21:42:23.000Z","dependencies_parsed_at":"2022-11-02T13:15:59.941Z","dependency_job_id":null,"html_url":"https://github.com/HavenShen/Slim-Cors","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HavenShen%2FSlim-Cors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HavenShen%2FSlim-Cors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HavenShen%2FSlim-Cors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HavenShen%2FSlim-Cors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HavenShen","download_url":"https://codeload.github.com/HavenShen/Slim-Cors/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232133879,"owners_count":18477299,"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","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":["cors","framework","middleware","slim"],"created_at":"2025-01-01T23:16:56.694Z","updated_at":"2025-01-01T23:16:57.328Z","avatar_url":"https://github.com/HavenShen.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Slim Framework CORS Protection\n\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/HavenShen/Slim-Cors/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/HavenShen/Slim-Cors/?branch=master)\n[![Build Status](https://scrutinizer-ci.com/g/HavenShen/Slim-Cors/badges/build.png?b=master)](https://scrutinizer-ci.com/g/HavenShen/Slim-Cors/build-status/master)\n[![Code Coverage](https://scrutinizer-ci.com/g/HavenShen/Slim-Cors/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/HavenShen/Slim-Cors/?branch=master)\n[![Build Status](https://travis-ci.org/HavenShen/Slim-Cors.svg?branch=master)](https://travis-ci.org/HavenShen/Slim-Cors)\n[![Latest Stable Version](https://poser.pugx.org/HavenShen/Slim-Cors/v/stable.svg)](https://packagist.org/packages/HavenShen/Slim-Cors)\n[![Latest Unstable Version](https://poser.pugx.org/HavenShen/Slim-Cors/v/unstable.svg)](https://packagist.org/packages/HavenShen/Slim-Cors)\n[![Latest Stable Version](https://img.shields.io/packagist/v/HavenShen/Slim-Cors.svg?style=flat-square)](https://packagist.org/packages/HavenShen/Slim-Cors)\n[![Total Downloads](https://img.shields.io/packagist/dt/HavenShen/Slim-Cors.svg?style=flat-square)](https://packagist.org/packages/HavenShen/Slim-Cors)\n[![License](https://img.shields.io/packagist/l/HavenShen/Slim-Cors.svg?style=flat-square)](https://packagist.org/packages/HavenShen/Slim-Cors)\n\nThis repository contains a Slim Framework CORS middleware.\n\n## Install\n\nVia Composer\n\n``` bash\n$ composer require havenshen/slim-cors\n```\n\nRequires Slim 3.0.0 or newer.\n\n## Usage\n\nIn most cases you want to register HavenShen\\Slim\\Cors.\n\n### Register\n\n```php\n$app = new \\Slim\\App([\n    'settings' =\u003e [\n        'dispayErrorDetails' =\u003e true,\n    ]\n]);\n\n$container = $app-\u003egetContainer();\n\n$container['cors'] = function ($c) {\n    return new \\HavenShen\\Slim\\Cors\\Guard;\n};\n\n$app-\u003eadd($container-\u003eget('cors'));\n```\n\n## Testing\n\n``` bash\n$ phpunit\n```\n\n## Development progress\n\ncontinues to update...\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhavenshen%2Fslim-cors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhavenshen%2Fslim-cors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhavenshen%2Fslim-cors/lists"}