mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
Merge pull request #486 from fourplusone/fix_redirect
use relative path for redirects avoiding problems with reverse proxies
This commit is contained in:
commit
1b339a6a6d
1 changed files with 1 additions and 1 deletions
|
@ -98,7 +98,7 @@ async.waterfall([
|
|||
//the pad id was sanitized, so we redirect to the sanitized version
|
||||
if(sanitizedPadId != padId)
|
||||
{
|
||||
var real_path = req.path.replace(/^\/p\/[^\/]+/, '/p/' + sanitizedPadId);
|
||||
var real_path = req.path.replace(/^\/p\/[^\/]+/, './' + sanitizedPadId);
|
||||
res.header('Location', real_path);
|
||||
res.send('You should be redirected to <a href="' + real_path + '">' + real_path + '</a>', 302);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue