Add to your wp-config.php file on the backend server the following lines :
if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') $_SERVER['HTTPS']='on';
And add to your Nginx reverse proxy config file this line :
proxy_set_header X-Forwarded-Proto https;
P.S. if you have some mixed content (insecure) just install the plugin WordPress HTTPS (SSL)
Source: WordPress