Created
August 25, 2020 16:14
-
-
Save lukecav/0878af0675083ceb5cc87094f73e6361 to your computer and use it in GitHub Desktop.
Force SSL Admin using a constant but not have WP-CLI complain
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
define('FORCE_SSL_ADMIN', true); | |
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_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
wp-cli/wp-cli#2562
https://gist.github.com/wgroenewold/68fcaaabfbf939282b1a5cddd6f636e8