Skip to content
Myr

refactor res.redirect() relative check

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by TJ Holowaychuk · committed by TJ Holowaychuk · parent 5db3d0f · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:lib/response.js+1 added-1 removed
567 unmodified lines
568 if (!~url.indexOf('://')) {569 var path = app.path();570571 // relative to path572 if (0 == url.indexOf('./') || 0 == url.indexOf('..')) {572 if ('.' == url[0]) {573 url = req.path + '/' + url;574 // relative to mount-point575 } else if ('/' != url[0]) {576 url = path + '/' + url;
99 unmodified lines