From 4a0964066e1f29781866262d8623c8344a140a02 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Sat, 21 Nov 2020 10:09:35 -0800 Subject: [PATCH] Add X-Forwarded-Proto to gerrit apache config This fixes directly linked changes redirecting to an incorrect port. Example: https://review.opendev.org/712697 => Location: https://review.opendev.org:80/c/openstack/nova/+/712697/ https://bugs.chromium.org/p/gerrit/issues/detail?id=13701 Change-Id: I750c9048b85f119b309ab676b930a201d81f9099 --- playbooks/roles/gerrit/templates/gerrit.vhost.j2 | 1 + 1 file changed, 1 insertion(+) diff --git a/playbooks/roles/gerrit/templates/gerrit.vhost.j2 b/playbooks/roles/gerrit/templates/gerrit.vhost.j2 index c90d551197..5d6a4936cf 100644 --- a/playbooks/roles/gerrit/templates/gerrit.vhost.j2 +++ b/playbooks/roles/gerrit/templates/gerrit.vhost.j2 @@ -66,6 +66,7 @@ # Comment out these two lines if the maintenance message above is in use ProxyPass / http://localhost:8081/ nocanon ProxyPassReverse / http://localhost:8081/ + RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME} Alias /robots.txt /home/gerrit2/review_site/static/robots.txt