Last active
August 29, 2015 14:13
-
-
Save ajaegers/cb8c414b4509e6c9e25c to your computer and use it in GitHub Desktop.
[Fix] Wordpress HTTPS detection improved (detects https under haproxy HTTP_X_FORWARDED_PROTO). Fix redirects.
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
// | |
// Best way to fix it even it'll never been fixed in WordPress core | |
if ($_SERVER['HTTP_PROXY_HTTPS'] == 'https') $_SERVER['HTTPS']='on'; | |
// | |
// OR | |
// | |
if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') $_SERVER['HTTPS']='on'; | |
// more on http://codex.wordpress.org/Administration_Over_SSL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment