base_url for both http and https? I have a site that is accessible both through http and https. I see  the security review complains that base_url is not defined in settings.php.

However when I define it as http://example.com, and flush all caches, my template in https is not rendered. 

When I comment out the $base_url line in settings.php everything comes back to normal.

How can I resolve this problem?
You probably need to do something like this:

$protocol = (!empty($_SERVER['HTTPS'])) ? 'https' : 'http';
$base_url = $protocol . '://mysite.com';


...so that Drupal knows which protocol to use depending on how the site was accessed.