Index: includes/bootstrap.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v retrieving revision 1.417 diff -r1.417 bootstrap.inc 567a568,583 > $trust_proxy_headers = isset($conf['reverse_proxy']) ? $conf['reverse_proxy'] : FALSE; > } > else { > // This should only happen during the initial install. While the > // installer does not currently require this to be correct at this > // time, trusting headers at this point allows future changes to our > // install procedure to include, for example, AJAX callbacks prior > // to the creation of settings.php. > $trust_proxy_headers=TRUE; > } > > if ($trust_proxy_headers) { > $is_https = (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == "https") || (isset($_SERVER['HTTP_FRONT_END_HTTPS']) && $_SERVER['HTTP_FRONT_END_HTTPS'] == 'on'); > } > else { > $is_https = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on'; 569d584 < $is_https = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on'; Index: includes/install.core.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/install.core.inc,v retrieving revision 1.28 diff -r1.28 install.core.inc 1016a1017,1021 > if (!file_exists(DRUPAL_ROOT . '/' . conf_path() . '/settings.php')) { > if ( (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && strtolower($_SERVER['HTTP_X_FORWARDED_FOR']) == "https") || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == "https") || (isset($_SERVER['HTTP_FRONT_END_HTTPS']) && $_SERVER['HTTP_FRONT_END_HTTPS'] == 'on') ) { > $settings['reverse_proxy'] = TRUE; > } else $settings['reverse_proxy'] = FALSE; // XXX > } Index: includes/install.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/install.inc,v retrieving revision 1.142 diff -r1.142 install.inc 205,223d204 < * Auto detect the base_url with PHP predefined variables. < * < * @param $file < * The name of the file calling this function so we can strip it out of < * the URI when generating the base_url. < * @return < * The auto-detected $base_url that should be configured in settings.php < */ < function drupal_detect_baseurl($file = 'install.php') { < $proto = $_SERVER['HTTPS'] ? 'https://' : 'http://'; < $host = $_SERVER['SERVER_NAME']; < $port = ($_SERVER['SERVER_PORT'] == 80 ? '' : ':' . $_SERVER['SERVER_PORT']); < $uri = preg_replace("/\?.*/", '', $_SERVER['REQUEST_URI']); < $dir = str_replace("/$file", '', $uri); < < return "$proto$host$port$dir"; < } < < /** Index: modules/system/system.install =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.install,v retrieving revision 1.506 diff -r1.506 system.install 56a57,62 > // Try to detect reverse proxy. > $requirements['reverse_proxy'] = array( > 'title' => $t('Reverse proxy'), > 'value' => isset($_SERVER['HTTP_X_FORWARDED_FOR']) || isset($_SERVER['HTTP_X_FORWARDED_PROTO']) || isset($_SERVER['HTTP_FRONT_END_HTTPS']) ? "Detected" : "Not detected" . ' ('. l($t('more information'), 'http://drupal.org/documentation/reverse_proxies') .')', > ); >