Improved the nginx config to support SSL endpoints

Given the SSL endpoint is handled by heroku, the $https variable needs to be set based on the forwarded proto set by the heroku load balancer.