#12 new
James Ponder

proxy support for recaptcha

Reported by James Ponder | May 7th, 2009 @ 11:22 AM

Hi, thank you for creating such a great plug-in, I love it.

I have added proxy environment support to your plug-in, so that recaptcha works when you're behind a proxy. Here are the relevant lines:

lib/recaptcha.rb line 56

      proxyargs = []
      if (proxy = ENV['http_proxy']) then
        uri = URI.parse(proxy)
        proxyargs << uri.host << uri.port
        proxyargs << uri.userinfo.split(/:/) if uri.userinfo
      recaptcha = Net::HTTP::Proxy(*proxyargs).post_form URI.
        parse("http://#{RECAPTCHA_VERIFY_SERVER}/verify"), {
        :privatekey => private_key,

Thanks again


No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A rails plugin that adds helpers for the ReCAPTCHA API.

People watching this ticket