{"id":14966842,"url":"https://github.com/ethercreative/yii2-ip-ratelimiter","last_synced_at":"2025-08-21T10:18:20.646Z","repository":{"id":56979657,"uuid":"57393492","full_name":"ethercreative/yii2-ip-ratelimiter","owner":"ethercreative","description":"Allow guest clients to be rate limited, using their IP as the identifier","archived":false,"fork":false,"pushed_at":"2023-01-18T12:14:13.000Z","size":99,"stargazers_count":36,"open_issues_count":2,"forks_count":11,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-08-10T03:56:16.109Z","etag":null,"topics":[],"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/ethercreative.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":"2016-04-29T15:12:12.000Z","updated_at":"2025-06-16T18:28:02.000Z","dependencies_parsed_at":"2023-02-10T15:01:36.335Z","dependency_job_id":null,"html_url":"https://github.com/ethercreative/yii2-ip-ratelimiter","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ethercreative/yii2-ip-ratelimiter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethercreative%2Fyii2-ip-ratelimiter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethercreative%2Fyii2-ip-ratelimiter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethercreative%2Fyii2-ip-ratelimiter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethercreative%2Fyii2-ip-ratelimiter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ethercreative","download_url":"https://codeload.github.com/ethercreative/yii2-ip-ratelimiter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethercreative%2Fyii2-ip-ratelimiter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271462097,"owners_count":24763860,"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-21T02:00:08.990Z","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-09-24T13:37:01.930Z","updated_at":"2025-08-21T10:18:20.626Z","avatar_url":"https://github.com/ethercreative.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Yii2 IP Rate Limiter](resources/banner.jpg)\n\n# yii2-ip-ratelimiter\nAllow guest clients to be rate limited, using their IP as the identifier.\n\n## Installation\n\nThe preferred way to install this extension is through [composer](http://getcomposer.org/download/).\n\nEither run\n\n```\nphp composer.phar require ethercreative/yii2-ip-ratelimiter \"1.*\"\n```\n\nor add\n\n```\n\"ethercreative/yii2-ip-ratelimiter\": \"1.*\"\n```\n\nto the require section of your `composer.json` file.\n\n## Usage\n\nModify the bahavior method of the controller you want to rate limit\n\n```\npublic function behaviors()\n{\n\t$behaviors = parent::behaviors();\n\t$behaviors['rateLimiter'] = [\n\t\t// Use class\n\t\t'class' =\u003e \\ethercreative\\ratelimiter\\RateLimiter::className(),\n\n\t\t// The maximum number of allowed requests\n\t\t'rateLimit' =\u003e 100,\n\n\t\t// The time period for the rates to apply to\n\t\t'timePeriod' =\u003e 600,\n\n\t\t// Separate rate limiting for guests and authenticated users\n\t\t// Defaults to true\n\t\t// - false: use one set of rates, whether you are authenticated or not\n\t\t// - true: use separate ratesfor guests and authenticated users\n\t\t'separateRates' =\u003e false,\n\n\t\t// Whether to return HTTP headers containing the current rate limiting information\n\t\t'enableRateLimitHeaders' =\u003e false,\n\t];\n\treturn $behaviors;\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethercreative%2Fyii2-ip-ratelimiter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fethercreative%2Fyii2-ip-ratelimiter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethercreative%2Fyii2-ip-ratelimiter/lists"}