Reputation: 267010
How can I tell if the current request is using ssl or not?
What about if the port is other than port 80?
Upvotes: 0
Views: 68
Reputation: 1580
request.ssl? will be true and request.port will give you the port the quest was on.
Upvotes: 2
Reputation: 3722
request.ssl
Should tell you
Source: http://www.rubyinside.com/19-rails-tricks-most-rails-coders-dont-know-131.html
Upvotes: 1