Skip to content

Instantly share code, notes, and snippets.

@jonathonbyrdziak
Created April 30, 2015 16:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonathonbyrdziak/d5cba21d4d0e79fb317c to your computer and use it in GitHub Desktop.
Save jonathonbyrdziak/d5cba21d4d0e79fb317c to your computer and use it in GitHub Desktop.
Working with Magento SSL behind a Load Balancer
/**
* 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