File tree Expand file tree Collapse file tree 1 file changed +17
-7
lines changed
Expand file tree Collapse file tree 1 file changed +17
-7
lines changed Original file line number Diff line number Diff line change 131131# Install Brotli
132132if version 24.04 " $DISTRO " 26.04.10
133133then
134- install_if_not brotli
135- a2enmod brotli
134+ if [ -z /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
136151fi
137152
138153# Generate nextcloud_tls_domain.conf
@@ -157,11 +172,6 @@ then
157172 <FilesMatch "\.php$">
158173 SetHandler "proxy:unix:/run/php/php$PHPVER -fpm.nextcloud.sock|fcgi://localhost"
159174 </FilesMatch>
160-
161- # Brotli support
162- <IfModule mod_brotli.c>
163- 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
164- </IfModule>
165175
166176 # Intermediate configuration
167177 Header add Strict-Transport-Security: "max-age=15552000;includeSubdomains"
You can’t perform that action at this time.
0 commit comments