Add proxy in front
This commit is contained in:
@ -79,6 +79,22 @@ $table_prefix = 'wp_';
|
||||
*/
|
||||
define( 'WP_DEBUG', false );
|
||||
|
||||
if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') {
|
||||
$_SERVER['HTTPS']='on';
|
||||
$_SERVER['SERVER_PORT']=443;
|
||||
}
|
||||
|
||||
if ( isset($_SERVER['HTTP_X_FORWARDED_HOST'])) {
|
||||
$_SERVER['HTTP_HOST'] = $_SERVER['HTTP_X_FORWARDED_HOST'];
|
||||
define('WP_SITEURL', 'https://{{website.external_hostname}}');
|
||||
define('WP_HOME', 'https://{{website.external_hostname}}');
|
||||
}else{
|
||||
define('WP_SITEURL', "http://{$_SERVER['HTTP_HOST']}");
|
||||
define('WP_HOME', "http://{$_SERVER['HTTP_HOST']}");
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* That's all, stop editing! Happy publishing. */
|
||||
|
||||
/** Absolute path to the WordPress directory. */
|
||||
|
||||
Reference in New Issue
Block a user