Enable Salvo's rate-limiter feature and add a place for the limiter middleware to live.
Scope
- Add
rate-limiter to the salvo feature list in the root Cargo.toml (currently: affix-state, cookie, logging, oapi, serve-static, size-limiter — no rate limiter).
- Create
src/web/limit.rs and wire it into src/web/mod.rs.
- Establish the building blocks: a guard (
SlidingGuard), an in-process store (MokaStore), and an IP issuer, so later issues can attach per-route limiters as hoops.
Notes
- Confirm exact type names against salvo 0.89.3.
MokaStore is in-process and assumes a single instance (true today) — document that assumption.
Parent: #50
Enable Salvo's
rate-limiterfeature and add a place for the limiter middleware to live.Scope
rate-limiterto thesalvofeature list in the rootCargo.toml(currently:affix-state,cookie,logging,oapi,serve-static,size-limiter— no rate limiter).src/web/limit.rsand wire it intosrc/web/mod.rs.SlidingGuard), an in-process store (MokaStore), and an IP issuer, so later issues can attach per-route limiters ashoops.Notes
MokaStoreis in-process and assumes a single instance (true today) — document that assumption.Parent: #50