behind ssl terminated load balancer

wp-config.php:

 // if site is set to run on SSL, then force-enable SSL detection!
 if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
     $_SERVER['HTTPS']='on';