changed config/config.php to add ['REQUEST_PROTOCOL'].

changed the subversion repository anchor to have the trailing slash
This commit is contained in:
2014-10-12 13:05:40 +00:00
parent 9dcf9a5daa
commit 270c2c8f8b
4 changed files with 22 additions and 13 deletions

View File

@ -17,17 +17,25 @@ if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']))
{
/* set to https if the first X-Forwarded-Proto is https */
if (array_search ("https", array_map ('strtolower', preg_split("/[\s,]+/", $_SERVER['HTTP_X_FORWARDED_PROTO']))) === 0)
{
$config['base_url'] = 'https';
$_SERVER['REQUEST_PROTOCOL'] = 'https';
}
else
{
$config['base_url'] = 'http';
$_SERVER['REQUEST_PROTOCOL'] = 'http';
}
}
else if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on')
{
$config['base_url'] = 'https';
$_SERVER['REQUEST_PROTOCOL'] = 'https';
}
else
{
$config['base_url'] = 'http';
$_SERVER['REQUEST_PROTOCOL'] = 'http';
}
$config['base_url'] .= "://{$_SERVER['HTTP_HOST']}";