Is there a way to pass SSL parameters to the "rails server" (on Rails 3.0.0) using a custom Rack configuration or something similar? I am trying to do two things:
- enable Cucumber to run tests that include both secure and insecure URLs, and
- make things simple for new developers, so they donβt need to configure Apache and configure all the SSL / cert materials before they can even write a line of code.
In 2.3.8, we had a forked script / server server that would run a special WEBrick on the second port with all the relevant SSL parameters. Of course, it exploded when I tried to upgrade to Rails 3, so I'm trying to figure out how to fix it, and ideally make it so that there is nothing.
In our forked script / server, we set the following parameters:
:SSLEnable => true, :SSLVerifyClient => OpenSSL::SSL::VERIFY_NONE, :SSLPrivateKey => OpenSSL::PKey::RSA.new(File.open(current_dir + "/config/certs/server.key").read), :SSLCertificate => OpenSSL::X509::Certificate.new(File.open(current_dir + "/config/certs/server.crt").read), :SSLCertName => [ [ "CN", WEBrick::Utils::getservername ] ]
but I donβt know how to do this in the new structure.
Thanks for any help!
estoner
source share