{"id":21211987,"url":"https://github.com/adiologydev/oak-rate-limit","last_synced_at":"2025-12-11T21:04:47.625Z","repository":{"id":45276358,"uuid":"438773351","full_name":"adiologydev/oak-rate-limit","owner":"adiologydev","description":"Rate-limiting middleware for Oak server on Deno","archived":false,"fork":false,"pushed_at":"2024-08-13T21:48:28.000Z","size":22,"stargazers_count":16,"open_issues_count":6,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-11-09T23:20:34.534Z","etag":null,"topics":["deno","hacktoberfest","rate-limiter"],"latest_commit_sha":null,"homepage":"https://deno.land/x/oak_rate_limit","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adiologydev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null},"funding":{"ko_fi":"adityatd"}},"created_at":"2021-12-15T21:07:44.000Z","updated_at":"2025-07-16T08:31:52.000Z","dependencies_parsed_at":"2025-07-10T10:53:48.882Z","dependency_job_id":"1c854c21-bbd2-41ec-9344-1bbb43ef15d3","html_url":"https://github.com/adiologydev/oak-rate-limit","commit_stats":null,"previous_names":["adiologydev/oak-rate-limit","adityatd/oak-rate-limit"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/adiologydev/oak-rate-limit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adiologydev%2Foak-rate-limit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adiologydev%2Foak-rate-limit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adiologydev%2Foak-rate-limit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adiologydev%2Foak-rate-limit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adiologydev","download_url":"https://codeload.github.com/adiologydev/oak-rate-limit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adiologydev%2Foak-rate-limit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27556676,"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-12-06T02:00:06.463Z","response_time":60,"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":["deno","hacktoberfest","rate-limiter"],"created_at":"2024-11-20T21:06:56.149Z","updated_at":"2025-12-11T21:04:47.358Z","avatar_url":"https://github.com/adiologydev.png","language":"TypeScript","funding_links":["https://ko-fi.com/adityatd","https://ko-fi.com/W7W31Z2B3"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# oak-rate-limit\n\n[![deno version](https://img.shields.io/badge/deno-^1.23.3-lightgrey?logo=deno\u0026style=flat-square)](https://github.com/denoland/deno)\n[![Discord](https://img.shields.io/discord/265485800668528651?color=697EC4\u0026label=Discord\u0026logo=discord\u0026logoColor=FDFEFE\u0026style=flat-square)](https://discord.gg/cu8aMYw)\n[![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/AdityaTD/oak-rate-limit?include_prereleases)](https://deno.land/x/oak_rate_limit)\n\nRate limiter for Oak Server on Deno\n\n\u003c/div\u003e\n\n## Description\n\nA Simple Rate Limiter for Oak Server on Deno inspired by express-rate-limit.\nIt's currently under development and if you'd like to contribute, feel free to\nmake a PR!\n\n## Features\n\n- Custom Cache Stores Support. Currently using Map by default (more coming\n  soon).\n- Timestamp Comparisons instead of Intervals for Efficiency.\n- Custom handlers, window duration, max requests, status code, and error message\n  support.\n\n## Usage\n\n```ts\nimport { RateLimiter } from \"https://deno.land/x/oak_rate_limit/mod.ts\";\n\nconst rateLimit = RateLimiter({\n  store: STORE, // Using MapStore by default.\n  windowMs: 1000, // Window for the requests that can be made in miliseconds.\n  max: (_ctx: Context) =\u003e 100, // Max requests within the predefined window.\n  headers: true, // Default true, it will add the headers X-RateLimit-Limit, X-RateLimit-Remaining.\n  message: \"Too many requests, please try again later.\", // Default message if rate limit reached.\n  statusCode: 429, // Default status code if rate limit reached.\n});\n\napp.use(await rateLimit);\n```\n\n## Configuration\n\n`onRateLimit(opt, ctx, next)`\n\nDefine a custom method to handle when the rate limit has been reached. The\ndefault implementation will send a 429 status code and the message defined in\nthe message option.\n\n`skip(ctx)`\n\nDefine a custom method to skip/whitelist the rate limit. The default\nimplementation will return false.\n\n## Liked The Project?\n\n[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/W7W31Z2B3)\n\n## License\n\n[Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadiologydev%2Foak-rate-limit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadiologydev%2Foak-rate-limit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadiologydev%2Foak-rate-limit/lists"}