Enum jsonrpc_http_server::RequestMiddlewareAction
[−]
[src]
pub enum RequestMiddlewareAction { Proceed { should_continue_on_invalid_cors: bool, }, Respond { should_validate_hosts: bool, handler: BoxFuture<Response, Error>, }, }
Action undertaken by a middleware.
Variants
Proceed
Proceed with standard RPC handling
Fields of Proceed
should_continue_on_invalid_cors: bool | Should the request be processed even if invalid CORS headers are detected? This allows for side effects to take place. |
Respond
Intercept the request and respond differently.
Fields of Respond
should_validate_hosts: bool | Should standard hosts validation be performed? |
handler: BoxFuture<Response, Error> | hyper handler used to process the request |
Trait Implementations
impl From<Option<Response>> for RequestMiddlewareAction
[src]
impl<T> From<Option<T>> for RequestMiddlewareAction where
T: IntoFuture<Item = Response, Error = Error>,
T::Future: Send + 'static,
[src]
T: IntoFuture<Item = Response, Error = Error>,
T::Future: Send + 'static,