From d075b44aa71e698a57b674c73b7498ab56b30859 Mon Sep 17 00:00:00 2001 From: Romulus21 Date: Thu, 29 Oct 2026 17:08:46 +0100 Subject: [PATCH] =?UTF-8?q?Pr=C3=A9prod=20:=20mot=20de=20passe=20exig?= =?UTF-8?q?=C3=A9=20aussi=20en=20HTTPS=20derri=C3=A8re=20le=20proxy=20OVH?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Chez OVH le TLS est terminé en amont : %{HTTPS} n'est jamais « on », donc l'exception HTTP laissait tout passer. Require valid-user sans condition, plus HSTS pour ne pas repasser en HTTP. Co-Authored-By: Claude Opus 5.5 --- .gitea/workflows/preprod.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/preprod.yml b/.gitea/workflows/preprod.yml index cf11fde..e1fd360 100644 --- a/.gitea/workflows/preprod.yml +++ b/.gitea/workflows/preprod.yml @@ -74,16 +74,16 @@ jobs: | ssh ovh 'cat > ~/.htpasswd-preprod && chmod 644 ~/.htpasswd-preprod' { - echo '# Préproduction : accès par mot de passe (HTTP n'"'"'est autorisé que pour la redirection vers HTTPS)' + # Pas d'exception pour HTTP : chez OVH le TLS est terminé en amont, %{HTTPS} n'est jamais « on ». + # HSTS évite que le navigateur repasse en HTTP (et envoie le mot de passe en clair). + echo '# Préproduction : accès par mot de passe' echo 'AuthType Basic' echo 'AuthName "Preproduction MSP Marcillac"' echo "AuthUserFile $remote_home/.htpasswd-preprod" - echo '' - echo ' Require expr %{HTTPS} != "on"' - echo ' Require valid-user' - echo '' + echo 'Require valid-user' echo '' echo ' Header always set X-Robots-Tag "noindex, nofollow"' + echo ' Header always set Strict-Transport-Security "max-age=31536000"' echo '' echo cat dist/.htaccess