How to use the original function from parseurl

Find comprehensive JavaScript parseurl.original code examples handpicked from public code repositorys.

216
217
218
219
220
221
222
223
224
225
226
 * @private
 */


function getResourceName (req) {
  try {
    return parseUrl.original(req).pathname
  } catch (e) {
    return 'resource'
  }
}
fork icon0
star icon0
watch icon1

189
190
191
192
193
194
195
196
197
198
  next()
  return
}

// pathname mismatch
var originalPath = parseUrl.original(req).pathname || '/'
if (originalPath.indexOf(cookieOptions.path || '/') !== 0) return next();

// ensure a secret is available or bail
if (!secret && !req.secret) {
fork icon0
star icon0
watch icon1

81
82
83
84
85
86
87
88
89
90
  res.end()
  return
}

var forwardError = !fallthrough
var originalUrl = parseUrl.original(req)
var path = parseUrl(req).pathname

// make sure redirect occurs at mount
if (path === '/' && originalUrl.pathname.substr(-1) !== '/') {
fork icon0
star icon0
watch icon0

106
107
108
109
110
111
112
113
114
115
  return;
}

// parse URLs
var url = parseUrl(req);
var originalUrl = parseUrl.original(req);
var dir = decodeURIComponent(url.pathname);
var originalDir = decodeURIComponent(originalUrl.pathname);

// join / normalize from root dir
fork icon0
star icon0
watch icon0