method

standard_port?

standard_port?()
public

Returns whether this request is using the standard port

class Request < Rack::Request
  include ActionDispatch::Http::URL
end

req = Request.new 'HTTP_HOST' => 'example.com:80'
req.standard_port? # => true

req = Request.new 'HTTP_HOST' => 'example.com:8080'
req.standard_port? # => false