Class: PactBroker::UI::App::RedirectRootToRelationships

Inherits:
Object
  • Object
show all
Defined in:
lib/pact_broker/ui/app.rb

Class Method Summary collapse

Class Method Details

.call(env) ⇒ Object



37
38
39
40
41
42
43
44
45
# File 'lib/pact_broker/ui/app.rb', line 37

def self.call env
  # A request for the root path in the browser (not the json index) should
  # redirect to ui/relationships
  if (env['PATH_INFO'].chomp("/") == "")
    [303, {'Location' => 'ui/relationships'},[]]
  else
    [404, {},[]]
  end
end