From 2410922979b884dfaa3ad5fc386e027d26d48627 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Tue, 3 Nov 2020 14:17:42 +0100 Subject: [PATCH] x-forwarded-proto --- haproxy.cfg | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/haproxy.cfg b/haproxy.cfg index 933f2e0..3735f49 100644 --- a/haproxy.cfg +++ b/haproxy.cfg @@ -40,7 +40,7 @@ defaults errorfile 504 /etc/haproxy/errors/504.http listen stats - bind *:8088 ssl crt /etc/ssl/haproxy + bind *:8080 ssl crt /etc/ssl/haproxy stats enable stats uri / @@ -61,7 +61,8 @@ frontend https # capture du domaine demandé pour les logs capture request header Host len 32 - reqadd X-Forwarded-Proto:\ https + http-request set-header X-Forwarded-Proto http if !{ ssl_fc } + http-request set-header X-Forwarded-Proto https if { ssl_fc } # acl letsencrypt path_dir -i /.well-known/acme-challenge # use_backend letsencrypt if letsencrypt