Skip to content

Commit 0c34400

Browse files
authored
Enable Brotli support (#2704)
1 parent b757130 commit 0c34400

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

lets-encrypt/activate-tls.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,28 @@ then
128128
SETENVPROXY="SetEnv proxy-sendcl 1"
129129
fi
130130

131+
# Install Brotli
132+
if version 24.04 "$DISTRO" 26.04.10
133+
then
134+
if ! [ -f /etc/apache2/conf-available/brotli.conf ]
135+
then
136+
# Install needed packaages
137+
install_if_not brotli
138+
139+
# Add the config
140+
{
141+
echo "# Brotli support"
142+
echo "<IfModule mod_brotli.c>"
143+
echo " AddOutputFilterByType BROTLI_COMPRESS text/html text/plain text/xml text/css text/javascript application/x-javascript application/javascript application/json application/x-font-ttf application/vnd.ms-fontobject image/x-icon"
144+
echo "</IfModule>"
145+
} > /etc/apache2/conf-available/brotli.conf
146+
147+
# Enable the config
148+
a2enmod brotli
149+
a2enconf brotli
150+
fi
151+
fi
152+
131153
# Generate nextcloud_tls_domain.conf
132154
if [ ! -f "$tls_conf" ]
133155
then

0 commit comments

Comments
 (0)