Redirect back to the original page, if any
11738
function (req, res) {
      req.session.loggedIn = true;
      if (config.oauth2.validateHostedDomain) {
        req.session.allowedDomain = config.oauth2.hostedDomain;
      }
      var redirect = req.session.oauth2return || '/';
      delete req.session.oauth2return;
      res.redirect(redirect);
    }
678285
function findPage(pages, path) {
  const p = path.shift();
  const page = pages.find(page => page.path === p);

  if (!page) {
    return {redirect: getDefaultPath(pages)};
  }
  if (page.children) {
    const result = findPage(page.children, path);
    if (result.page) {
      return result;
    }
    return {redirect: [p].concat(result.redirect)};
  }
  if (path.length) {
    return {redirect: []};
  }
  return {page};
}
1106493
def options(self, url, callback=None, retry=0, **kwargs):
        """"""
        kwargs.setdefault("allow_redirects", True)
        return self.request(
            "options", url=url, callback=callback, retry=retry, **kwargs
        )
1327714
def compatibly_redirect_back(request_params = {})
        # :only-rails5+:
        if Rails::VERSION::MAJOR >= 5
          redirect_back fallback_location: { action: :index }, **request_params
        # :only-rails5+:
        # :except-rails5+:
        elsif request.referer
          redirect_to :back, **request_params
        else
          redirect_to action: :index, **request_params
        end
        # :except-rails5+:
        true
      end
1295676
def lazy_raise_or_redirect():
    '''
    
    '''
    if not request.view_args:
        return
    for name, value in request.view_args.items():
        if isinstance(value, NotFound):
            request.routing_exception = value
            break
        elif isinstance(value, LazyRedirect):
            new_args = request.view_args
            new_args[name] = value.arg
            new_url = url_for(request.endpoint, **new_args)
            return redirect(new_url)
765578
def redirect_response(self, url, permanent=False):
        
        if permanent:
            self.send_response(301)
        else:
            self.send_response(302)
        self.send_header("Location", url)
        self.end_headers()
152809
def redirect(self, url, status=None):
        
        self.status_code = 302 if status is None else status
        self.headers = Headers([('location', url)])
        self.message = ''
        self.end()
879592
public function redirectOnSuccess() {
		$params = [];
		if (!empty($this->options['bypass_hidden_from_input'])) {
			foreach ($this->options['bypass_hidden_from_input'] as $v) {
				$params[$v] = $this->options['input'][$v] ?? '';
			}
		}
		if (!empty($this->options['collection_current_tab_id'])) {
			$params[$this->options['collection_current_tab_id']] = $this->form_link;
		}
		$url = \Application::get('mvc.full') . '?' . http_build_query2($params) . '#' . ($this->options['input']['__anchor'] ?? '');
		$this->redirect($url);
	}
178072
function redirect(url, response) {
    const header  = {
        'Location': url
    };
    
    assert(url, 'url could not be empty!');
    assert(response, 'response could not be empty!');
    
    fillHeader(header, response);
    response.statusCode = MOVED_PERMANENTLY;
    response.end();
}
495018
function redirectFocus () {
    ctrl.styleTabItemFocus = ($mdInteraction.getLastInteractionType() === 'keyboard');
    var tabToFocus = getElements().tabs[ctrl.focusIndex];
    if (tabToFocus) {
      tabToFocus.focus();
    }
  }
452361
protected function redirectBackWithSession()
    {
        if ($redirect = Session::get('redirect')) {
            Session::forget('redirect');

            return Redirect::to($redirect);
        }

        return Redirect::back();
    }
525904
def get_redirect(request):
        
        params = request.GET.copy()
        params.pop(TOKEN_NAME)
        url = request.path
        if params:
            url += '?' + urlencode(params)
        return redirect(url)
980716
protected function redirectToBackUri ()
    {
        $backUri = $this->getGetParam('backUri');
        if ($backUri) {
            $this->redirect()->toUrl($backUri);
            return true;
        }

        return false;
    }
247250
def getReturnPage(context, prior=False):
    '''
    
    '''
    siteHistory = getattr(context.get('request',None),'session',{}).get('SITE_HISTORY',{})
    return returnPageHelper(siteHistory,prior=prior)
605133
def get(self, url, params=None, callback=None, retry=0, **kwargs):
        """"""
        kwargs.setdefault("allow_redirects", True)
        return self.request(
            "get", url=url, params=params, callback=callback, retry=retry, **kwargs
        )
973658
def home
      if page.link_url.present? && page.link_url != "/"
        redirect_to page.link_url, status: 301 and return
      end
      render_with_templates?
    end
651336
def resource_redirect(id):
    '''
    
    '''
    resource = get_resource(id)
    return redirect(resource.url.strip()) if resource else abort(404)