Wordpress has issues to detect the SSL connection betwenn the client and the proxy and thus may load static assets through http instead https, which will be blocked in moderns browsers (mixed content).
To circumvent the problem, simly extend your wp-config.php by following functions (insert towards the top of the config script):
/** Proxy SSL detection */
function detect_proxy_ssl() {
if (isset($_SERVER['HTTP_X_FORWARDED_SSL']) && strpos($_SERVER['HTTP_X_FORWARDED_SSL'], 'on') !== false) {
return true;
}
$variants = [
'HTTP_X_FORWARDED_SSL',
'HTTP_X_FORWARDED_PROTO',
'HTTP-X-FORWARDED-PROTO',
'X_FORWARDED_PROTO',
'X-FORWARDED-PROTO',
'X_Forwarded_Proto',
'X-Forwarded-Proto'
];
foreach ($variants as $variant) {
if (isset($_SERVER[$variant]) && strpos($_SERVER[$variant], 'https') !== false) {
return true;
}
}
return false;
}
if (detect_proxy_ssl()) {
$_SERVER['HTTPS']='on';
define('FORCE_SSL_ADMIN', true);
define('FORCE_SSL_LOGIN', true);
}
Much appreciated! 🙏