Closed cameronja closed 9 years ago
I was having great difficulty loading my install over ssl.
The $_SERVER['HTTPS'] variable wasn't present but there was a $_SERVER['HTTP_X_FORWARDED_PROTO'] variable.
This may occur when using cloudflare. The following code fixes the SSL issue:
$config['base_url']= "http".((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' || $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')? 's' : '') ."://".$config['server_name']. rtrim(WEB_ROOT, '/').'/';
Cool. Yeah, this looks like a common issue when serving from behind proxy servers.
I've pushed this change to the develop branch and it'll go out with the next release.
I was having great difficulty loading my install over ssl.
The $_SERVER['HTTPS'] variable wasn't present but there was a $_SERVER['HTTP_X_FORWARDED_PROTO'] variable.
This may occur when using cloudflare. The following code fixes the SSL issue:
$config['base_url']= "http".((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' || $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')? 's' : '') ."://".$config['server_name']. rtrim(WEB_ROOT, '/').'/';