Created
September 19, 2016 16:49
-
-
Save AtsushiA/761e94cdf530bce068d508c2dccda06f to your computer and use it in GitHub Desktop.
WordPress Detect if SSL is used. This is required since we are terminating SSL either on CloudFront or on ELB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** FIX Redirect loop (add wp-config.php) | |
Detect if SSL is used. This is required since we are terminating SSL either on CloudFront or on ELB | |
**/ | |
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