Method: Browser::Middleware#resolve_redirection

Defined in:
lib/browser/middleware.rb

#resolve_redirection(env, current_path, path) ⇒ Object



36
37
38
39
40
41
42
43
44
# File 'lib/browser/middleware.rb', line 36

def resolve_redirection(env, current_path, path)
  uri = URI.parse(path)

  if uri.path == current_path
    run_app(env)
  else
    redirect(path)
  end
end