Last active
March 21, 2018 14:31
Copy HTTP_X_FORWARDED_PROTO to HTTPS so WordPress can detect is_ssl()
This file contains hidden or 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