The ssl_requirement plugin indicates that I can override the
ssl_required? method. I want to use this facility to ignore the ssl
requirement declarations when RAILS_ENV is anything other than
‘production’.
Also, does this plugin work with a WEBrick based development environment
running on port 3000? It looks like it is totally dropping the port
from the url.
The ssl_requirement plugin indicates that I can override the
ssl_required? method. I want to use this facility to ignore the ssl
requirement declarations when RAILS_ENV is anything other than
‘production’.
My question is, where do I override this?
You could do it in your ApplicationController:
class ApplicationController < ActiveRecord::Base
include SslRequirement
alias :original_ssl_required? :ssl_required?
def ssl_required?
my_custom_condition_met? || original_ssl_required?
end
Also, does this plugin work with a WEBrick based development
environment
running on port 3000? It looks like it is totally dropping the port
from the url.
The SSL redirects assume that https maps to port 443. You would need
to have a webrick running on port 3000 and port 443 (with port 443
being the secure port).
Jamis
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.