joshfrench / rakismet

Easy Akismet and TypePad AntiSpam integration for Rails
MIT License
355 stars 46 forks source link

Enabling http proxy #11

Closed frankmt closed 13 years ago

frankmt commented 13 years ago

Hi,

in my current project we are deploying the app behind a firewall, which means we cannot access directly external resources and rakismet was failing when trying to access akismet. Since we've thought this could be a common situation, I'd like to propose a patch in order to use Net::HTTP:Proxy.

In case the proxy is set, via the proxy_host and proxy_port parameters, then Rakismet will be accessing Akismet via the proxy. When they are not set, Net::HTTP::Proxy will still work bypassing the proxy (as defined here: http://ruby-doc.org/stdlib/libdoc/net/http/rdoc/classes/Net/HTTP.html).

Cheers, Francisco

joshfrench commented 13 years ago

I was waiting for someone to write this patch! Apologies for sitting on it so long. I've merged & pushed as Rakismet 1.1.0. Thanks!!

frankmt commented 13 years ago

Thanks! Happy to help.

Cheers, Francisco

Francisco Trindade

On Wednesday, 6 July 2011 at 6:43 AM, joshfrench wrote:

I was waiting for someone to write this patch! Apologies for sitting on it so long. I've merged & pushed as Rakismet 1.1.0. Thanks!!

Reply to this email directly or view it on GitHub: https://github.com/joshfrench/rakismet/pull/11#issuecomment-1507196