代理后面的 mailgun-ruby
mailgun-ruby behind a proxy
我在代理(需要身份验证)后的 sinatra 应用程序中使用 mailgun-ruby gem。
有什么方法可以配置 gem 通过此代理与 mailgun API 通信吗?
每次应用程序输出
'Mailgun::CommunicationError - Timed out connecting to server'
它looks like mailgun-ruby
uses RestClient
behind-the-scenes, which means you should be able to configure RestClient
to use a proxy.
它可能和 RestClient.proxy = ENV['http_proxy']
一样简单,但您最终可能不得不使用猴子补丁 Mailgun::Client
。
我在代理(需要身份验证)后的 sinatra 应用程序中使用 mailgun-ruby gem。
有什么方法可以配置 gem 通过此代理与 mailgun API 通信吗? 每次应用程序输出 'Mailgun::CommunicationError - Timed out connecting to server'
它looks like mailgun-ruby
uses RestClient
behind-the-scenes, which means you should be able to configure RestClient
to use a proxy.
它可能和 RestClient.proxy = ENV['http_proxy']
一样简单,但您最终可能不得不使用猴子补丁 Mailgun::Client
。