{"id":17356648,"url":"https://github.com/gsquire/limiter","last_synced_at":"2025-08-02T06:32:42.845Z","repository":{"id":62442235,"uuid":"59607588","full_name":"gsquire/limiter","owner":"gsquire","description":"Request size limiting for the Iron framework","archived":false,"fork":false,"pushed_at":"2018-11-19T19:39:29.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-24T04:17:09.253Z","etag":null,"topics":["iron","middleware","rust"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/limiter","language":"Rust","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/gsquire.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-05-24T20:47:45.000Z","updated_at":"2018-11-19T19:39:31.000Z","dependencies_parsed_at":"2022-11-01T22:16:03.810Z","dependency_job_id":null,"html_url":"https://github.com/gsquire/limiter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gsquire/limiter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gsquire%2Flimiter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gsquire%2Flimiter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gsquire%2Flimiter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gsquire%2Flimiter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gsquire","download_url":"https://codeload.github.com/gsquire/limiter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gsquire%2Flimiter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267198670,"owners_count":24051559,"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-07-26T02:00:08.937Z","response_time":62,"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":["iron","middleware","rust"],"created_at":"2024-10-15T18:57:48.198Z","updated_at":"2025-08-02T06:32:42.570Z","avatar_url":"https://github.com/gsquire.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# limiter\n\n[![Build Status](https://travis-ci.org/gsquire/limiter.svg?branch=master)](https://travis-ci.org/gsquire/limiter)\n\nThis is an example of `BeforeMiddleware` for the [Iron](https://github.com/iron/iron) framework.  It limits the request body size\nby checking first the Content-Length header, then the size of the payload. The response is either\nan HTTP 413 or it continues down the chain.\n\nIt will also set an upper bound on the length of a URL which can be helpful in regular\n`GET` requests.\n\nInclude this in your `Cargo.toml` file:\n\n```sh\n[dependencies]\nlimiter = \"0.3\"\n```\n\n## Documentation\nhttps://docs.rs/limiter\n\n### Example\n\n```rust\nextern crate iron;\nextern crate limiter;\n\nuse iron::prelude::*;\n\nuse limiter::RequestLimit;\n\nfn index(_: \u0026mut Request) -\u003e IronResult\u003cResponse\u003e {\n    Ok(Response::with((iron::status::Ok, \"Test\")))\n}\n\nfn main() {\n    let max_request = RequestLimit::default();\n    let mut chain = Chain::new(index);\n    chain.link_before(max_request);\n    Iron::new(chain).http(\"localhost:3000\").unwrap();\n}\n```\n\n### License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgsquire%2Flimiter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgsquire%2Flimiter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgsquire%2Flimiter/lists"}