Skip to content

Instantly share code, notes, and snippets.

@stovak
Last active December 21, 2015 20:00
Show Gist options
  • Save stovak/6358601 to your computer and use it in GitHub Desktop.
Save stovak/6358601 to your computer and use it in GitHub Desktop.
<?php
if (defined('PANTHEON_ENVIRONMENT')) {
// Use Redis for caching.
$conf['redis_client_interface'] = 'PhpRedis';
$conf['cache_backends'][] = 'profiles/apigee/modules/contrib/redis/redis.autoload.inc';
$conf['cache_default_class'] = 'Redis_Cache';
$conf['cache_prefix'] = array('default' => 'pantheon-redis');
// Do not use Redis for cache_form (no performance difference).
$conf['cache_class_cache_form'] = 'DrupalDatabaseCache';
}
if (isset($_SERVER['PANTHEON_ENVIRONMENT'])) {
if ((!array_key_exists("HTTP_SSLCLIENTCIPHER", $_SERVER)) || trim($_SERVER['HTTP_SSLCLIENTCIPHER']) == '') {
header('HTTP/1.0 301 Moved Permanently');
header('Location: https://'.$_SERVER['PANTHEON_ENVIRONMENT'].'-SITEURL'. $_SERVER['REQUEST_URI']);
exit();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment