Administration Over SSL: What does "$_SERVER['HTTPS']='on';" do?
-
Https was not loading assets correctly when trying to access my site via https. I came across this that explains how to enable https for administrators by putting this:
define('FORCE_SSL_ADMIN', true); if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') $_SERVER['HTTPS']='on';
into the wp-config.php. Problem is it seems the reverse proxy being used does not have the ‘HTTP_X_FORWARDED_PROTO’ header properly configured. It also isn’t explained in the documentation what assigning the $_SERVER[‘HTTPS’] to ‘on’ does exactly.
I have tried setting $_SERVER[‘HTTPS’]=’on’; without the if condition and the https displays correctly, but then my scheduled posts no longer work. I’m at a loss of what to do. Thanks for the help
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Administration Over SSL: What does "$_SERVER['HTTPS']='on';" do?’ is closed to new replies.