Flowdock
protocol() public

Returns ‘https://’ if this is an SSL request and ‘http://’ otherwise.

req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com'
req.protocol # => "http://"

req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com', 'HTTPS' => 'on'
req.protocol # => "https://"
Show source
Register or log in to add new notes.