omniauth behind proxy

回眸只為那壹抹淺笑 提交于 2019-12-22 09:39:11

问题


I have a small app using omniauth and I'm testing it with LinkedIn provider (omniauth-linkedin). Unfortunately my test environment is behind a proxy. So I need to access linkedin through a proxy.

How do I set the proxy address so the request to linkedin will succeed? It does not seem to be obeying the http_proxy settings.


回答1:


I figured it out, I think..

ue OmniAuth::Builder do
  provider :linkedin, "KEY", "SECRET", {:client_options => { :proxy =>\
 ENV["HTTP_PROXY"] || ENV["http_proxy"]  }}
end


来源:https://stackoverflow.com/questions/10326416/omniauth-behind-proxy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!