WordPress And SSL

I was having some difficulty migrating my site to SSL and found that this code needed to be added to wp-config.php.

if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') 
          $_SERVER['HTTPS']='on';

This Facebook URL helped to debug some issues with meta tags too.