From bae4a6e395b3f59f50e501604bb54cc3c457227c Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Wed, 20 Jul 2016 09:25:38 -0400
Subject: [PATCH] Disable the HTTP_PROXY header in the ispconfig and apps vhost files for apache and nginx. ISPConfig itself does not read nor interpret this header, but there might be other server components like PHP that might interact with it so I'll disable it just to be sure.

---
 server/conf/apache_apps.vhost.master      |    4 ++++
 install/tpl/apache_ispconfig.vhost.master |    1 +
 install/tpl/nginx_apps.vhost.master       |    1 +
 install/tpl/apache_apps.vhost.master      |    4 ++++
 install/tpl/nginx_ispconfig.vhost.master  |    1 +
 server/conf/nginx_apps.vhost.master       |    1 +
 6 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/install/tpl/apache_apps.vhost.master b/install/tpl/apache_apps.vhost.master
index e56b1d6..4930e25 100644
--- a/install/tpl/apache_apps.vhost.master
+++ b/install/tpl/apache_apps.vhost.master
@@ -15,6 +15,10 @@
     SetHandler None
   </FilesMatch>
   
+  <IfModule mod_headers.c>
+	RequestHeader unset Proxy early
+  </IfModule>
+  
   <IfModule mod_php5.c>
     DocumentRoot {tmpl_var name='apps_vhost_dir'}
     AddType application/x-httpd-php .php
diff --git a/install/tpl/apache_ispconfig.vhost.master b/install/tpl/apache_ispconfig.vhost.master
index 6b71378..8aa41fa 100644
--- a/install/tpl/apache_ispconfig.vhost.master
+++ b/install/tpl/apache_ispconfig.vhost.master
@@ -82,6 +82,7 @@
 
   <IfModule mod_headers.c>
     Header always add Strict-Transport-Security "max-age=15768000"
+	RequestHeader unset Proxy early
   </IfModule>
 
   <tmpl_if name='apache_version' op='>=' value='2.3.3' format='version'>
diff --git a/install/tpl/nginx_apps.vhost.master b/install/tpl/nginx_apps.vhost.master
index d2dc07b..e1bb6d1 100644
--- a/install/tpl/nginx_apps.vhost.master
+++ b/install/tpl/nginx_apps.vhost.master
@@ -40,6 +40,7 @@
 
                fastcgi_param   GATEWAY_INTERFACE       CGI/1.1;
                fastcgi_param   SERVER_SOFTWARE         nginx/$nginx_version;
+			   fastcgi_param   HTTP_PROXY              "";
 
                fastcgi_param   REMOTE_ADDR             $remote_addr;
                fastcgi_param   REMOTE_PORT             $remote_port;
diff --git a/install/tpl/nginx_ispconfig.vhost.master b/install/tpl/nginx_ispconfig.vhost.master
index 8498770..c426e9d 100644
--- a/install/tpl/nginx_ispconfig.vhost.master
+++ b/install/tpl/nginx_ispconfig.vhost.master
@@ -36,6 +36,7 @@
                fastcgi_busy_buffers_size 256k;
                fastcgi_temp_file_write_size 256k;
                fastcgi_read_timeout 1200;
+			   fastcgi_param HTTP_PROXY "";
         }
 
         location ~ /\. {
diff --git a/server/conf/apache_apps.vhost.master b/server/conf/apache_apps.vhost.master
index 7d6d665..47d3530 100644
--- a/server/conf/apache_apps.vhost.master
+++ b/server/conf/apache_apps.vhost.master
@@ -14,6 +14,10 @@
   <FilesMatch "\.ph(p3?|tml)$">
     SetHandler None
   </FilesMatch>
+  
+  <IfModule mod_headers.c>
+	RequestHeader unset Proxy early
+  </IfModule>
 
   {tmpl_if name="enable_spdy" op="==" value="y"}
   <IfModule spdy_module>
diff --git a/server/conf/nginx_apps.vhost.master b/server/conf/nginx_apps.vhost.master
index 1101d19..ed5e3a4 100644
--- a/server/conf/nginx_apps.vhost.master
+++ b/server/conf/nginx_apps.vhost.master
@@ -32,6 +32,7 @@
 
                fastcgi_param   GATEWAY_INTERFACE       CGI/1.1;
                fastcgi_param   SERVER_SOFTWARE         nginx/$nginx_version;
+			   fastcgi_param   HTTP_PROXY              "";
 
                fastcgi_param   REMOTE_ADDR             $remote_addr;
                fastcgi_param   REMOTE_PORT             $remote_port;

--
Gitblit v1.9.1