To use SSL throughout the Pantheon dev workflow
When using the dev-my-site.pantheon.io domain (or test or live), put this bad boy at the top of your settings. It will redirect HTTP to HTTPS.
/sites/default/settings.php
<?php
// Require HTTPS on pantheon
if (isset($_SERVER['PANTHEON_ENVIRONMENT']) &&
$_SERVER['HTTPS'] === 'OFF') {
if (!isset($_SERVER['HTTP_X_SSL']) ||
(isset($_SERVER['HTTP_X_SSL']) && $_SERVER['HTTP_X_SSL'] != 'ON')) {
header('HTTP/1.0 301 Moved Permanently');
header('Location: https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
exit();
}
}
...
Also see the related pantheon docs.