{"id":34010471,"url":"https://github.com/coolephp/rate-limiter","last_synced_at":"2026-04-08T17:32:05.808Z","repository":{"id":56957781,"uuid":"373048897","full_name":"coolephp/rate-limiter","owner":"coolephp","description":"Provides a Token Bucket implementation to rate limit input and output in your Coole application. - 提供令牌桶实现来限制 Coole 应用程序中的输入和输出。","archived":false,"fork":false,"pushed_at":"2021-06-05T08:35:27.000Z","size":552,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-15T17:51:35.927Z","etag":null,"topics":["limiter","rate","rate-limiter"],"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/coolephp.png","metadata":{"files":{"readme":"README-CN.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null},"funding":{"patreon":"guanguans","custom":"https://www.guanguans.cn/images/wechat.jpeg"}},"created_at":"2021-06-02T05:22:29.000Z","updated_at":"2021-06-05T08:34:54.000Z","dependencies_parsed_at":"2022-08-21T04:40:24.046Z","dependency_job_id":null,"html_url":"https://github.com/coolephp/rate-limiter","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/coolephp/rate-limiter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coolephp%2Frate-limiter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coolephp%2Frate-limiter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coolephp%2Frate-limiter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coolephp%2Frate-limiter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coolephp","download_url":"https://codeload.github.com/coolephp/rate-limiter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coolephp%2Frate-limiter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31566804,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["limiter","rate","rate-limiter"],"created_at":"2025-12-13T12:04:44.760Z","updated_at":"2026-04-08T17:32:05.794Z","avatar_url":"https://github.com/coolephp.png","language":"PHP","readme":"# rate-limiter\n\n[简体中文](README-CN.md) | [ENGLISH](README.md)\n\n\u003e Provides a Token Bucket implementation to rate limit input and output in your Coole application. - 提供令牌桶实现来限制 Coole 应用程序中的输入和输出。\n\n[![Tests](https://github.com/coolephp/rate-limiter/workflows/Tests/badge.svg)](https://github.com/coolephp/rate-limiter/actions)\n[![Check \u0026 fix styling](https://github.com/coolephp/rate-limiter/workflows/Check%20\u0026%20fix%20styling/badge.svg)](https://github.com/coolephp/rate-limiter/actions)\n[![codecov](https://codecov.io/gh/coolephp/rate-limiter/branch/main/graph/badge.svg?token=URGFAWS6S4)](https://codecov.io/gh/coolephp/rate-limiter)\n[![Latest Stable Version](https://poser.pugx.org/coolephp/rate-limiter/v)](//packagist.org/packages/coolephp/rate-limiter)\n[![Total Downloads](https://poser.pugx.org/coolephp/rate-limiter/downloads)](//packagist.org/packages/coolephp/rate-limiter)\n[![License](https://poser.pugx.org/coolephp/rate-limiter/license)](//packagist.org/packages/coolephp/rate-limiter)\n\n## 环境要求\n\n* PHP \u003e= 7.2\n\n## 安装\n\n``` bash\n$ composer require coolephp/rate-limiter --prefer-dist -vvv\n```\n\n## 使用\n\n1. 复制 `rate-limiter/config/rate-limiter.php` 为 `coole-skeleton/config/rate-limiter.php`.\n2. 配置 `\\Coole\\RateLimiter\\RateLimiter::class` 中间件.\n\n``` php\n\u003c?php\n\nreturn [\n    /*\n     * App 名称\n     */\n    'name' =\u003e env('APP_NAME', 'Coole'),\n\n    /*\n     * 全局中间件\n     */\n    'middleware' =\u003e [\n        ...\n        \\Coole\\RateLimiter\\RateLimiter::class\n        ...\n    ],\n];\n```\n\n![product](docs/product.png)\n\n![develop](docs/develop.png)\n\n## 测试\n\n``` bash\n$ composer test\n```\n\n## 变更日志\n\n请参阅 [CHANGELOG](CHANGELOG.md) 获取最近有关更改的更多信息。\n\n## 贡献指南\n\n请参阅 [CONTRIBUTING](.github/CONTRIBUTING.md) 有关详细信息。\n\n## 安全漏洞\n\n请查看[我们的安全政策](../../security/policy)了解如何报告安全漏洞。\n\n## 贡献者\n\n* [guanguans](https://github.com/guanguans)\n* [所有贡献者](../../contributors)\n\n## 协议\n\nMIT 许可证（MIT）。有关更多信息，请参见[协议文件](LICENSE)。\n","funding_links":["https://patreon.com/guanguans","https://www.guanguans.cn/images/wechat.jpeg"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoolephp%2Frate-limiter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoolephp%2Frate-limiter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoolephp%2Frate-limiter/lists"}