From d8fab654ee3b284e7d2afdef52bc75e80447ae56 Mon Sep 17 00:00:00 2001 From: Blooym <19539165+Blooym@users.noreply.github.com> Date: Tue, 26 Mar 2024 05:10:17 +0000 Subject: [PATCH] refactor: enable cache headers by default --- crates/cli/src/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/cli/src/main.rs b/crates/cli/src/main.rs index 56f3043..16bedad 100644 --- a/crates/cli/src/main.rs +++ b/crates/cli/src/main.rs @@ -77,11 +77,13 @@ struct AppOptions { /// /// If one of the `cache-*` crate features are enabled the request will already be cached server-side for that requested duration, /// so sending the `Cache-Control` header to the client is favourable behaviour as it can sometimes lighten server load. + // https://stackoverflow.com/questions/77771008/ #[arg( long = "use-received-cache-headers", - env = "AIGIS_USE_RECEIVED_CACHE_HEADERS" + env = "AIGIS_USE_RECEIVED_CACHE_HEADERS", + default_value_t = true )] - use_received_cache_headers: bool, + use_received_cache_headers: std::primitive::bool, /// The maximum Content-Length that can be proxied by this server. #[arg(