Crate actix_limitation
source · [−]Expand description
Rate limiter using a fixed window counter for arbitrary keys, backed by Redis for Actix Web.
[dependencies]
actix-web = "4"
-actix-limitation = "0.3"
use std::{sync::Arc, time::Duration};
use actix_web::{dev::ServiceRequest, get, web, App, HttpServer, Responder};
use actix_session::SessionExt as _;