Table of Contents
SSL and HTTPS and WooCommerce
Websites behind load balancers or reverse proxies
WooCommerce uses the is_ssl() WordPress function to verify if your website using SSL or not.
is_ssl() checks if the connection is via HTTPS or on Port 443. However, this won't work for websites behind load balancers, especially websites hosted at Network Solutions. For details, read WordPress is_ssl() function reference notes.
Websites behind load balancers or reverse proxies that support HTTP_X_FORWARDED_PROTO can be fixed by adding the following code to the wp-config.php file, above the require_once call:
if ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && 'https' == $_SERVER['HTTP_X_FORWARDED_PROTO'] ) {
$_SERVER['HTTPS'] = 'on';
}
注意: CloudFlareを使用する場合は、設定が必要です。彼らのドキュメントを確認してください。