From eec249d006ca003932cd0ca6d0a7b9b52847e2ef Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Fri, 14 Nov 2014 18:04:45 +0530 Subject: [PATCH] Don't preserve Host header during Apache proxying When Apache proxy forwards a request it usually makes the request to the backend server with a new Host: header but sends the original host information using a special header X-FORWARDED-HOST: header. It is a common practise. The backend can be make the choice of which header to use based on the knowledge that it is running behind a proxy server. Since hostname of a FreedomBox machine could be anyting and it could change during the operation of Plinth, having a list of incoming Host: header values is not going to be easy in Plinth. If Apache were not to force override this header, managing list of Host: header values will become easiler in Plinth. If Plinth indeed wants to know the original host name by which user refferred to it, it can use the X-FORWARDED-HOST: header which is the norm in these situtations. --- data/etc/apache2/sites-available/plinth-ssl.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/data/etc/apache2/sites-available/plinth-ssl.conf b/data/etc/apache2/sites-available/plinth-ssl.conf index 8fe2993de..3638d7c5c 100644 --- a/data/etc/apache2/sites-available/plinth-ssl.conf +++ b/data/etc/apache2/sites-available/plinth-ssl.conf @@ -9,7 +9,6 @@ Header always set Strict-Transport-Security "max-age=31536000" ## Shared options. - ProxyPreserveHost on DocumentRoot /usr/share/plinth ## Use this rule to hang plinth off of plinth.(servername)