{"id":44334979,"url":"https://github.com/labrador-kennel/http-cors","last_synced_at":"2026-02-11T11:13:14.640Z","repository":{"id":49447951,"uuid":"169839637","full_name":"labrador-kennel/http-cors","owner":"labrador-kennel","description":"Middleware for @amphp http-server to handle CORS requests!","archived":false,"fork":false,"pushed_at":"2024-05-04T23:17:40.000Z","size":62,"stargazers_count":10,"open_issues_count":1,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-05T07:32:33.715Z","etag":null,"topics":["amphp","cors","http-server"],"latest_commit_sha":null,"homepage":"https://labrador-kennel.io/docs/http-cors","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/labrador-kennel.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-09T06:40:19.000Z","updated_at":"2025-03-02T14:30:01.000Z","dependencies_parsed_at":"2024-05-04T13:40:44.882Z","dependency_job_id":"eb98fd5b-1f5c-4855-8305-860e49fa6221","html_url":"https://github.com/labrador-kennel/http-cors","commit_stats":{"total_commits":28,"total_committers":6,"mean_commits":4.666666666666667,"dds":0.3571428571428571,"last_synced_commit":"cff881f1760b01a1512239c191953e71f9aef77d"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/labrador-kennel/http-cors","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labrador-kennel%2Fhttp-cors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labrador-kennel%2Fhttp-cors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labrador-kennel%2Fhttp-cors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labrador-kennel%2Fhttp-cors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/labrador-kennel","download_url":"https://codeload.github.com/labrador-kennel/http-cors/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labrador-kennel%2Fhttp-cors/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29332296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T06:13:03.264Z","status":"ssl_error","status_checked_at":"2026-02-11T06:12:55.843Z","response_time":97,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["amphp","cors","http-server"],"created_at":"2026-02-11T11:13:13.854Z","updated_at":"2026-02-11T11:13:14.634Z","avatar_url":"https://github.com/labrador-kennel.png","language":"PHP","funding_links":[],"categories":["HTTP"],"sub_categories":["Server"],"readme":"# Labrador HTTP CORS\n\n[![GitHub release](https://img.shields.io/github/release/labrador-kennel/http-cors.svg?style=flat-square)](https://github.com/labrador-kennel/http-cors/releases/latest)\n[![GitHub license](https://img.shields.io/github/license/labrador-kennel/http-cors.svg?style=flat-square)](http://opensource.org/licenses/MIT)\n\nA PHP 8+ library intended to provide spec-compliant CORS middleware for projects running on [Amp's http-server](https://amphp.org/http-server/). \nThough this library lives under the Labrador namespace it has only one dependency, `amphp/http-server`, and does not depend \non any other Labrador packages.\n\n## Installation\n\n[Composer](https://getcomposer.org) is the only supported method for installing Labrador packages.\n\n```\ncomposer require cspray/labrador-http-cors\n```\n\n## Example\n\nBelow is an example using the fluent API. Please check out the documentation for more details and examples of non-fluent \nusage.\n\n```php\n\u003c?php\n\nuse Cspray\\Labrador\\Http\\Cors\\ConfigurationBuilder;\nuse Cspray\\Labrador\\Http\\Cors\\SimpleConfigurationLoader;\nuse Cspray\\Labrador\\Http\\Cors\\CorsMiddleware;\n\n$configuration = ConfigurationBuilder::forOrigins('https://example.com', 'https://foo.example.com')\n    -\u003eallowMethods('GET', 'POST', 'PUT', 'DELETE')\n    -\u003ewithMaxAge(8600)\n    -\u003eallowRequestHeaders('X-Request-Header')\n    -\u003eexposeResponseHeaders('X-Response-Header')\n    -\u003edoAllowCredentials()\n    -\u003ebuild();\n$loader = new SimpleConfigurationLoader($configuration);\n$middleware = new CorsMiddleware($loader);\n```\n\n## Supported Versions\n\nOnly the 1.x release series is officially supported at this time. The previous 0.x release series will not see new \nfeatures and will only see critical security fixes.\n\n## Documentation\n\nLabrador packages have thorough documentation in-repo in the `docs/` directory. You can also check out the documentation \nonline at [https://labrador-kennel.io/docs/http-cors](https://labrador-kennel.io/docs/http-cors).\n\n## Governance\n\nAll Labrador packages adhere to the rules laid out in the [Labrador Governance repo](https://github.com/labrador-kennel/governance).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flabrador-kennel%2Fhttp-cors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flabrador-kennel%2Fhttp-cors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flabrador-kennel%2Fhttp-cors/lists"}