Skip to content

rate-limiting: enable salvo rate-limiter feature + scaffold limit.rs #53

Description

@disconsented

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions