Ruby 和 Rails - oauth 和 http 代理

2024-03-03

有谁知道如何使用 Rails 的 oauth 实现 HTTP 代理? 我正在使用 oauth gem,但位于代理服务器后面。

发现解决这个问题非常困难。 非常令人沮丧!

谢谢你的帮助,

John


尝试在创建消费者时添加 :proxy 属性:

@consumer = OAuth::Consumer.new( consumer_key, consumer_secret, {
  :site               => 'http://site.com',
  :proxy              => 'http://proxy.mycompany.com:8080',
  :request_token_path => "/oauth/request_token",
  :access_token_path  => "/oauth/access_token",
  :authorize_path     => "/oauth/authorize"
  })
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Ruby 和 Rails - oauth 和 http 代理 的相关文章

随机推荐