docs: function saveReturnUrlToSession(req, isReturnUrlAllowed) {
    const referrer = req.get("referrer")
    const isInternalRequest = Boolean(
      referrer && url.parse(referrer).hostname === req.hostname
    )
  
    const isUrlAllowed = isReturnUrlAllowed(req.originalUrl)
    const isSessionSet = Boolean(req.session && req.session.returnTo)
  
    if (!isUrlAllowed || isInternalRequest || isSessionSet) {
      return
    }
  
    req.session.returnTo = req.originalUrl
  }