Class: Rack::Request

Inherits:
Object show all
Defined in:
lib/kiss/ext/rack.rb

Instance Method Summary collapse

Instance Method Details

#serverObject



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/kiss/ext/rack.rb', line 13

def server
  url = scheme + "://"
  url << host

  if scheme == "https" && port != 443 ||
      scheme == "http" && port != 80
    url << ":#{port}"
  end
  
  url
end