correction encore

This commit is contained in:
2026-03-30 22:40:09 +02:00
parent 8ab2d988fe
commit 751af7adb4
5 changed files with 38 additions and 7 deletions
+12
View File
@@ -5,6 +5,18 @@
RewriteEngine On
# Reconnaître les headers du reverse proxy pour HTTPS
<IfModule mod_setenvif.c>
SetEnvIf X-Forwarded-Proto "https" HTTPS=on
SetEnvIf X-Forwarded-Proto "^https$" SSL_PROTOCOL=TLSv1
</IfModule>
# Forcer HTTPS en production
RewriteCond %{ENV:HTTPS} !=on
RewriteCond %{HTTP_HOST} !^localhost
RewriteCond %{HTTP_HOST} !^127\.0\.0\.1
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]