Created
November 2, 2020 17:06
-
-
Save cstrouse/4bb1415d4437168d0e7219d7e0d7ecfe to your computer and use it in GitHub Desktop.
Add the following to wp-config.php to fix wp-cli warnings related to SSL and proxies on AWS (PHP Notice: Undefined index: HTTP_X_FORWARDED_PROTO in phar:///opt/bitnami/apps/wordpress/bin/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1197) : eval()'d code on line 114)
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 ); | |
define( 'FORCE_SSL_LOGIN', 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