Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix(docker): conditionally enable gzip compression in Traefik labels based on configuration

Andras Bacsaib7602e30b3d1
diff --git a/bootstrap/helpers/docker.php b/bootstrap/helpers/docker.php
index 930f95041f..944c51e3cc 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;