[drupal-devel] drupal site on forwarded server
7 Sep
2005
7 Sep
'05
11:01 p.m.
Hi list, I entered this first as an issue on the drupal site at http://drupal.org/node/30173, but got no reaction there. It's probably more suitable for a developer's discussion. If a drupal site is situated on an intranet and external requests are forwarded to it, the function 'conf_init' in bootstrap.inc uses the 'wrong' host name. It always uses $_SERVER['HTTP_HOST'], while in case of request forwarding it could use $_SERVER['HTTP_X_FORWARDED_SERVER']. The following code fragment (in conf_init() ) should improve this: if( isset( $_SERVER['HTTP_X_FORWARDED_SERVER'] ) ) $server = explode('.', rtrim($_SERVER['HTTP_X_FORWARDED_SERVER'], '.')); else $server = explode('.', rtrim($_SERVER['HTTP_HOST'], '.')); john.
7593
Age (days ago)
7593
Last active (days ago)
0 comments
1 participants
participants (1)
-
openwereld.net