From 70f70b38319d19ae77b1673d4a14563a659812c8 Mon Sep 17 00:00:00 2001 From: Vincent BRIDIER Date: Tue, 21 Apr 2026 15:02:01 +0000 Subject: [PATCH 1/2] feat: Add assets cache in htaccess --- public/.htaccess | 65 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/public/.htaccess b/public/.htaccess index dc7c3ed0..f72319b1 100644 --- a/public/.htaccess +++ b/public/.htaccess @@ -131,3 +131,68 @@ Redirect 301 "/en/top-start-for-the-vendee-globe-with-maitre-coq" "/en/news/top-start-for-the-vendee-globe-with-maitre-coq" Redirect 301 "/search" "/recherche" + + + ExpiresActive On + + # Images + ExpiresByType image/jpg "access plus 1 year" + ExpiresByType image/jpeg "access plus 1 year" + ExpiresByType image/png "access plus 1 year" + ExpiresByType image/gif "access plus 1 year" + ExpiresByType image/webp "access plus 1 year" + ExpiresByType image/svg+xml "access plus 1 year" + + # CSS / JS + ExpiresByType text/css "access plus 1 year" + ExpiresByType text/javascript "access plus 1 year" + ExpiresByType application/javascript "access plus 1 year" + ExpiresByType application/x-javascript "access plus 1 year" + + # WOFF / WOFF2 / Fonts + ExpiresByType application/font-woff "access plus 1 year" + ExpiresByType font/woff "access plus 1 year" + ExpiresByType application/font-woff2 "access plus 1 year" + ExpiresByType font/woff2 "access plus 1 year" + + # Favicon + ExpiresByType image/x-icon "access plus 1 year" + + + + Header set Cache-Control "public, max-age=31536000, immutable" + + + + AddOutputFilterByType BROTLI_COMPRESS text/html text/css text/plain text/xml text/javascript application/javascript application/x-javascript + AddType text/plain .br + + + + AddOutputFilterByType DEFLATE text/html + AddOutputFilterByType DEFLATE text/plain + AddOutputFilterByType DEFLATE text/xml + AddOutputFilterByType DEFLATE text/css + AddOutputFilterByType DEFLATE text/javascript + AddOutputFilterByType DEFLATE application/javascript + AddOutputFilterByType DEFLATE application/x-javascript + AddOutputFilterByType DEFLATE application/xml + AddOutputFilterByType DEFLATE application/xhtml+xml + AddOutputFilterByType DEFLATE application/rss+xml + AddOutputFilterByType DEFLATE image/svg+xml + + + + AddType application/javascript .js + AddType font/woff2 .woff2 + AddType application/font-woff2 .woff2 + AddType application/font-woff .woff + AddType font/woff .woff + AddType image/svg+xml .svg + + + + FileETag None + Header unset ETag + Header unset Set-Cookie + \ No newline at end of file From e319699d18a993305cc2b1daa58f34221997879a Mon Sep 17 00:00:00 2001 From: Vincent BRIDIER Date: Tue, 21 Apr 2026 15:26:45 +0000 Subject: [PATCH 2/2] feat: Add PHP TAG VAR on Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 83941486..197fa2e9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,7 +33,7 @@ RUN npm config set @uwil:registry=https://lab.s-web.fr/api/v4/groups/ldc-web/-/p RUN npm config set -- '//lab.s-web.fr/api/v4/groups/ldc-web/-/packages/npm/:_authToken' "${GITLAB_PASSWORD}" RUN npm ci && npm run prod -FROM registry.s-web.fr/ldc-web/projets/ldc-web-images-docker/uwil-production-8.4:170625-130159 +FROM registry.s-web.fr/ldc-web/projets/ldc-web-images-docker/uwil-production-8.5:${PHP_8_5_TAG} ARG USER=www-data