Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8923565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T07:09:32+00:00 2026-06-15T07:09:32+00:00

Following the guidance here , updated for Rails 3.2.x, I expected to be able

  • 0

Following the guidance here, updated for Rails 3.2.x, I expected to be able to configure Rack::SSL to use the SSL filters only if an https:// prefix is included:

config.force_ssl = true
config.ssl_options = { :exclude => proc { |env| puts 'here? ' + env.to_s; env['HTTPS'] != 'on' } }

However, https works, where http fails with the following error:

[2012-10-29 15:37:03] ERROR OpenSSL::SSL::SSLError: SSL_accept returned=1 errno=0 state=SSLv2/v3 read client hello A: http request
    /Users/user/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/openssl/ssl-internal.rb:164:in `accept'

The diagnostic code inserted into the lambda is not executed. How can I configure Rack:SSL in Rails 3.2.x to respond to both HTTP and HTTPS?

Rails 3.2.8, WEBrick configured for SSL using a self-signed cert.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T07:09:34+00:00Added an answer on June 15, 2026 at 7:09 am

    The ability to use the exclude option in the options hash has been removed as of May 2012 for some reason: https://github.com/rails/rails/pull/5515

    The error I was seeing was a red herring. The exclude was being ignored and the http:// request was being redirected in ActionDispatch::SSL to https://. OpenSSL was then choking (I assume) because of the protocol mismatch.

    The solution is to use the rack-ssl gem, as suggested here. This is essentially identical to ActionDispatch::SSL, except that the exclude option is still respected.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Not sure Looking for some guidance here... I have the following tables: site_text id
I am in need of some guidance for the following design. I have a
Following chunk html code works as expected: <iframe src=http://www.amazon.com/></iframe> But when trying embed inner
Following is the Play 2 app, https://github.com/playframework/Play20/tree/master/samples/java/forms Which portrays Dynamic form binding where form
I am trying to follow the following guidance from Apple about local file storage.
I have been following the guidance given on this other post: Assigning an IronPython
I need a little guidance here... I have 2 links: <div class=tarjBodyHolder> <div class=imageHolder>
I am following the instructions here: http://msdn.microsoft.com/en-us/library/ms228772(v=vs.80).aspx for .net 3.5 visual studio 2008 to
Any examples, tips, guidance for the following scenario? I have used Apache HttpClient to
i've been looking several guidance about this in Grails official documentation site here but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.