Django-allauth google 身份验证在生产中不起作用 (apache2 + mod_wsgi)
Django-allauth google authentication not working in production (apache2 + mod_wsgi)
我已经使用 apache 和 mod_wsgi 在我的学院服务器上部署了我的 django web 应用程序,并且我正在使用 django-allauth google 身份验证。我的研究所网络使用很少的代理服务器与 Internet 交互。
当我在本地主机上使用 运行 应用时,Google 身份验证工作正常,但是一旦我将应用迁移到 https_://fusion.*******.ac.in, google 认证显示如下
Error image
回调 uri: https_://fusion.*******.ac.in/accounts/google/login/callback/
请帮我解决这个问题。
在您的 wsgi 文件中添加以下行。
import os
http_proxy = "host:port"
https_proxy = "host:port"
ftp_proxy = "host:port"
proxyDict = {
"http" : http_proxy,
"https" : https_proxy,
"ftp" : ftp_proxy
}
os.environ["PROXIES"] = proxyDict
我已经使用 apache 和 mod_wsgi 在我的学院服务器上部署了我的 django web 应用程序,并且我正在使用 django-allauth google 身份验证。我的研究所网络使用很少的代理服务器与 Internet 交互。
当我在本地主机上使用 运行 应用时,Google 身份验证工作正常,但是一旦我将应用迁移到 https_://fusion.*******.ac.in, google 认证显示如下
Error image
回调 uri: https_://fusion.*******.ac.in/accounts/google/login/callback/
请帮我解决这个问题。
在您的 wsgi 文件中添加以下行。
import os
http_proxy = "host:port"
https_proxy = "host:port"
ftp_proxy = "host:port"
proxyDict = {
"http" : http_proxy,
"https" : https_proxy,
"ftp" : ftp_proxy
}
os.environ["PROXIES"] = proxyDict