2013-03-04 186 views
2

我正嘗試在我的django應用中使用django-social-auth。儘管我的Mac上的一切都正常,但是當我嘗試在Windows計算機上使用相同的代碼時,我需要407代理身份驗證。407需要代理驗證

<urlopen error Tunnel connection failed: 407 Proxy Authentication Required (Forefront 

TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )> 

任何幫助將不勝感激。

+0

聽起來像您的本地代理配置問題。 – geoffspear 2013-03-04 14:16:55

回答

1
Forefront TMG requires authorization to fulfill the request 

它看起來像您的機器配置(需要?)通過代理服務器(在這種情況下,微軟的TMG)路由出站流量。當用戶嘗試使用您的應用程序進行身份驗證時,Django正嘗試連接到另一個服務來驗證它們,但由於代理配置,它無法訪問該服務。

由於調用urlopen的代碼可能在django-social-auth中,因此您可能不希望直接修改該代碼以使用代理。您可以嘗試設置http_proxy環境變量(詳情請參閱this answer),以使全部爲 urllib請求通過代理),或者禁用您的Web服務器的代理身份驗證。

相關問題