1 2 3 4 5 6 7 8 9 10
use std::time::Duration; use tower_http::timeout::TimeoutLayer; use crate::config::ServerOptions; pub fn timeout_layer(_options: &ServerOptions) -> TimeoutLayer { //TODO: make this configurable TimeoutLayer::new(Duration::from_secs(30)) }