Expand description
Extra features for Salvo web framework.
This library provides some common web features.
salvo_extra uses a set of [feature flags] to reduce the amount of compiled and
optional dependencies.
§Feature flags
| Feature | Description |
|---|---|
affix-state | Middleware for adding prefix and suffix to the request path |
basic-auth | Middleware for basic authentication |
caching-headers | Middleware for setting caching headers |
catch-panic | Middleware for catching panics |
concurrency-limiter | Middleware for limiting concurrency |
force-https | Middleware for forcing HTTPS |
logging | Middleware for logging requests and responses |
request-id | Middleware for setting a request ID |
size-limiter | Middleware for limiting request size |
sse | Server-Sent Events (SSE) middleware |
timeout | Middleware for setting a timeout |
trailing-slash | Middleware for handling trailing slashes |
tower-compat | Adapters for tower::Layer and tower::Service |
websocket | WebSocket implementation |
Re-exports§
pub use tower_compat::TowerServiceCompat;tower-compatpub use tower_compat::TowerLayerCompat;tower-compat
Modules§
- affix_
state affix-state - Middleware for adding shared application state to the request context.
- basic_
auth basic-auth - Middleware for HTTP Basic Authentication.
- caching_
headers caching-headers - Middleware for handling ETag and Last-Modified headers.
- catch_
panic catch-panic - Middleware for catch panic in handlers.
- concurrency_
limiter concurrency-limiter - Middleware for limiting concurrency.
- force_
https force-https - Middleware force redirect to https.
- logging
logging - A simple logging middleware.
- request_
id request-id - Request id middleware.
- size_
limiter size-limiter - Middleware for limiting request size.
- sse
sse - Middleware for Server-Sent Events (SSE)
- timeout
timeout - Middleware for controlling requests timeout.
- tower_
compat tower-compat - Adapters for
tower::Layerandtower::Service. - trailing_
slash trailing-slash - Trailing slash middleware.
- websocket
websocket - WebSocket implementation.