docs: def safe_redirect(next_url, default=None):
      """Makes sure it's a legit site to redirect to.
  
      :param default: this is the default url or named url to redirect to in the
          event where next_url is not legit.
  
      """
      if is_legit_next_url(next_url):
          return redirect(next_url)
  
      if default:
          return redirect(default)
  
      return redirect('/')