Skip to content

Instantly share code, notes, and snippets.

@guilhermevini
Created November 8, 2018 18:55
Show Gist options
  • Save guilhermevini/4b8bdf6eedff39ac5cfb8dc63fe398b1 to your computer and use it in GitHub Desktop.
Save guilhermevini/4b8bdf6eedff39ac5cfb8dc63fe398b1 to your computer and use it in GitHub Desktop.
define('WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST']);
define('WP_HOME', 'https://' . $_SERVER['HTTP_HOST']);
if (($_SERVER['HTTP_CLOUDFRONT_FORWARDED_PROTO'] == 'https') OR ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')) {
$_SERVER['HTTPS']='on';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment