Last active
March 21, 2018 14:31
-
-
Save strangerstudios/e4245139b6b4b8b97072629a149c220c to your computer and use it in GitHub Desktop.
Copy HTTP_X_FORWARDED_PROTO to HTTPS so WordPress can detect is_ssl()
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
//copy HTTP_X_FORWARDED_PROTO config to HTTPS var in $_SERVER | |
if((empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off') && $_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