Skip to content

Instantly share code, notes, and snippets.

@alexguemez
Created January 8, 2017 18:23
Show Gist options
  • Save alexguemez/90b29f404f1f03105bc02416254ed6b1 to your computer and use it in GitHub Desktop.
Save alexguemez/90b29f404f1f03105bc02416254ed6b1 to your computer and use it in GitHub Desktop.
define('FORCE_SSL_ADMIN', true);
// in some setups HTTP_X_FORWARDED_PROTO might contain
// a comma-separated list e.g. http,https
// so check for https existence
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false)
$_SERVER['HTTPS']='on';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment