Expand description
Shared axum middleware for Victauri’s localhost HTTP servers.
Gated behind the middleware feature flag. Provides thin middleware
wrappers around the pure-logic security primitives in super::security.
Structs§
- Auth
State - Shared authentication state holding the optional Bearer token for the MCP server.
Functions§
- default_
rate_ limiter - Create a rate limiter with the default capacity of
DEFAULT_RATE_LIMITrequests per second. - dns_
rebinding_ guard - Axum middleware that blocks DNS rebinding attacks.
- origin_
guard - Axum middleware that blocks cross-origin requests from browsers.
- rate_
limit - Axum middleware that rejects requests with 429 when the token bucket is exhausted.
- require_
auth - Axum middleware that validates the
Authorization: Bearer <token>header againstAuthState. - security_
headers - Axum middleware that sets security-hardening response headers on every response.