Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ use thiserror::Error;
use tokio::{net::TcpListener, task::JoinHandle};
use tokio_util::sync::CancellationToken;
use tower::ServiceBuilder;
use tower_http::{cors::CorsLayer, limit::RequestBodyLimitLayer, trace::TraceLayer};
use tower_http::{
compression::CompressionLayer, cors::CorsLayer, limit::RequestBodyLimitLayer, trace::TraceLayer,
};
use tracing::{
Instrument, Level, error, field, info,
log::{trace, warn},
Expand Down Expand Up @@ -381,6 +383,8 @@ impl ApiServer {
append_default_headers,
));

router = router.layer(CompressionLayer::new().br(true));

router = router.layer(
ServiceBuilder::new()
.layer(HandleErrorLayer::new(handle_timeout_error))
Expand Down
Loading