Crate salvo_extra

Source
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

FeatureDescription
affix-stateMiddleware for adding prefix and suffix to the request path
basic-authMiddleware for basic authentication
caching-headersMiddleware for setting caching headers
catch-panicMiddleware for catching panics
concurrency-limiterMiddleware for limiting concurrency
force-httpsMiddleware for forcing HTTPS
loggingMiddleware for logging requests and responses
request-idMiddleware for setting a request ID
size-limiterMiddleware for limiting request size
sseServer-Sent Events (SSE) middleware
timeoutMiddleware for setting a timeout
trailing-slashMiddleware for handling trailing slashes
tower-compatAdapters for tower::Layer and tower::Service
websocketWebSocket implementation

Re-exports§

pub use tower_compat::TowerServiceCompat;tower-compat
pub use tower_compat::TowerLayerCompat;tower-compat

Modules§

affix_stateaffix-state
Middleware for adding shared application state to the request context.
basic_authbasic-auth
Middleware for HTTP Basic Authentication.
caching_headerscaching-headers
Middleware for handling ETag and Last-Modified headers.
catch_paniccatch-panic
Middleware for catch panic in handlers.
concurrency_limiterconcurrency-limiter
Middleware for limiting concurrency.
force_httpsforce-https
Middleware force redirect to https.
logginglogging
A simple logging middleware.
request_idrequest-id
Request id middleware.
size_limitersize-limiter
Middleware for limiting request size.
ssesse
Middleware for Server-Sent Events (SSE)
timeouttimeout
Middleware for controlling requests timeout.
tower_compattower-compat
Adapters for tower::Layer and tower::Service.
trailing_slashtrailing-slash
Trailing slash middleware.
websocketwebsocket
WebSocket implementation.