title: Why does my allauth email verification URL start 127.0.0.1 even though my site domain is set to a real address?
body: <p>I am using django-allauth for user accounts.  The site uses gunicorn behind nginx, so the Django URL is 127.0.0.1:8001, and in the headers the Host is 127.0.0.1:8001, but in the database django_site.domain is the correct URL and the site browses normally at that URL.  Outgoing email is set up through Gmail and works.  When I navigate to /accounts/email/, and click "Re-send Verification", I do get an email at the intended address, but the URL in the email is</p>
  
  <pre><code>To confirm this is correct, go to http://127.0.0.1:8001/accounts/confirm-email/685984c132925...
  </code></pre>
  
  <p>I dug into the code and it seems to get the site from Site.objects.get_current(), and when I test that in the shell it comes back with the valid URL and not 127.0.0.1:8001.  Why is allauth sending an email with the internal IP address instead of the site domain, and how do I fix it?</p>