我在nginx服务器上设置了Django项目。但是..。
request.get_host()作为localhost,并发送电子邮件(用于激活和密码重置)和链接,如http://localhost/...。social-auth-app-django建立了Facebook授权。但是Facebook试图打开redirect_uri in localhost (...redirect_uri=http:localhost/oauth/complete/facebook...)localhost。如何解决这些问题?或者,似乎有一个解决方案可以解决所有这些问题。
谢谢你的时间和帮助。
发布于 2019-03-28 21:48:10
您尝试过在管理面板或通过shell更改Site.domain和Site.name吗?from django.contrib.sites.models import Site
https://docs.djangoproject.com/en/2.1/ref/contrib/sites/
在很多情况下,例如默认的电子邮件,它都会被使用。
https://stackoverflow.com/questions/55407197
复制相似问题