From c0c26af655e5ffb1cb187185fce8c828a119c641 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 24 Aug 2018 10:45:52 -0300 Subject: [PATCH] Bug 21267: Set X-FORWARDED-PROTO https if required This patch makes the apache configuration for the reverse proxy (required for Plack) so it sets the X-FORWARDED-PROTO header correctly for Plack::Middleware::ReverseProxy to use it. Signed-off-by: Tomas Cohen Arazi Signed-off-by: Ulrich Kleiber Signed-off-by: Marcel de Rooy Since we actually resolve 19799 now (Changing language on OPAC redirects back to homepage), I will move that code to a new enh report. Signed-off-by: Nick Clemens (cherry picked from commit 302dd7bf8233ebf640bfde82fc050f8b08b2757c) Signed-off-by: Martin Renvoize (cherry picked from commit ee1eec9d255e3a9341c9e17558d6d1f835add5ce) Signed-off-by: Fridolin Somers --- debian/templates/apache-shared-intranet-plack.conf | 2 +- debian/templates/apache-shared-opac-plack.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/templates/apache-shared-intranet-plack.conf b/debian/templates/apache-shared-intranet-plack.conf index 5ae8e07e37..ff8cd9cf58 100644 --- a/debian/templates/apache-shared-intranet-plack.conf +++ b/debian/templates/apache-shared-intranet-plack.conf @@ -22,7 +22,7 @@ ProxyPreserveHost On - # RequestHeader set X-FORWARDED-PROTO "https" + RequestHeader set X-FORWARDED-PROTO "https" env=HTTPS # Point the intranet site to Plack ProxyPass /index.html "unix:/var/run/koha/${instance}/plack.sock|http://localhost/intranet/mainpage.pl" diff --git a/debian/templates/apache-shared-opac-plack.conf b/debian/templates/apache-shared-opac-plack.conf index 3ea6acd6c7..bee75e95f1 100644 --- a/debian/templates/apache-shared-opac-plack.conf +++ b/debian/templates/apache-shared-opac-plack.conf @@ -11,7 +11,7 @@ ProxyPreserveHost On - # RequestHeader set X-FORWARDED-PROTO "https" + RequestHeader set X-FORWARDED-PROTO "https" env=HTTPS # Point the OPAC site to Plack ProxyPass /index.html "unix:/var/run/koha/${instance}/plack.sock|http://localhost/opac/opac-main.pl"