Created
April 30, 2015 16:43
-
-
Save jonathonbyrdziak/d5cba21d4d0e79fb317c to your computer and use it in GitHub Desktop.
Working with Magento SSL behind a Load Balancer
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
/** | |
* EC2's load balancer sets these for us so we know we're secure, | |
* preventing Magento from performing a redirect loop. | |
**/ | |
if( isset($_SERVER['HTTP_X_FORWARDED_PROTO']) ) { | |
$_SERVER['HTTPS'] = 'on'; | |
$_SERVER['SERVER_PORT'] = 443; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment