From 37eeee07ddef2e33fdeb534a39dd6210ceb426a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20FAMIBELLE-PRONZOLA?= Date: Tue, 7 Jul 2026 23:59:52 +0400 Subject: [PATCH] fix(redirection): redirige HTTP vers HTTPS via .htaccess MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Ajoute les règles mod_rewrite pour forcer HTTPS - Gère les reverse proxies via X-Forwarded-Proto - Exclut le chemin Let's Encrypt .well-known/acme-challenge --- src/.htaccess | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/.htaccess b/src/.htaccess index 08a5a01..b1c33ee 100644 --- a/src/.htaccess +++ b/src/.htaccess @@ -1,3 +1,12 @@ + + RewriteEngine On + # Redirect HTTP to HTTPS, including behind reverse proxies + RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/ + RewriteCond %{HTTPS} off + RewriteCond %{HTTP:X-Forwarded-Proto} !https + RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] + + # Force HTTPS for one year Header always set Strict-Transport-Security "max-age=31536000"