From b7602e30b3d11d5a28d33b6215da80034916ef7e Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Wed, 25 Jun 2025 13:11:44 +0200 Subject: [PATCH] fix(docker): conditionally enable gzip compression in Traefik labels based on configuration --- bootstrap/helpers/docker.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bootstrap/helpers/docker.php b/bootstrap/helpers/docker.php index 930f95041..944c51e3c 100644 --- a/bootstrap/helpers/docker.php +++ b/bootstrap/helpers/docker.php @@ -359,7 +359,9 @@ function fqdnLabelsForTraefik(string $uuid, Collection $domains, bool $is_force_ { $labels = collect([]); $labels->push('traefik.enable=true'); - $labels->push('traefik.http.middlewares.gzip.compress=true'); + if ($is_gzip_enabled) { + $labels->push('traefik.http.middlewares.gzip.compress=true'); + } $labels->push('traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https'); $is_http_basic_auth_enabled = $is_http_basic_auth_enabled && $http_basic_auth_username !== null && $http_basic_auth_password !== null;