Django Allauth将电子邮件URL从127.0.0.0修改为服务器域名

时间:2017-06-10 07:06:27

标签: python django nginx django-allauth

Django Allauth将电子邮件网址从127.0.0.0修改为服务器域名

在Ubuntu服务器上运行Nginx。 Django contrib Sites有域名。

Django allauth发来的电子邮件是:

Account activate
    http://127.0.0.1:8080/accounts/confirm-email/Ng:1dJZDR:VG7ds1v0HnQKHKzdgXLHRqfL1w4/

Password reset
   http://127.0.0.1:8080/accounts/password/reset/key/3-4ms-081fe4fdd341442cd244/

当然,我想使用域example.com而不是127.0.0.1:8080

可以找到与域相关的任何内容     http://django-allauth.readthedocs.io/en/latest/configuration.html

1 个答案:

答案 0 :(得分:0)

问题在于Nginx,添加以下标题解决了它。

添加proxy_set_header主机$ http_host;在选项proxy_pass之前进入你的nginx配置。