Flowdock
raw_host_with_port() public

Returns the host and port for this request, such as “example.com:8080”.

req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com'
req.raw_host_with_port # => "example.com"

req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:80'
req.raw_host_with_port # => "example.com:80"

req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080'
req.raw_host_with_port # => "example.com:8080"
Show source
Register or log in to add new notes.