Merge pull request #3115 from noerw/redirect_fix

redirect /admin properly (fix #3114)
This commit is contained in:
John McLear 2018-04-03 13:10:36 +01:00 committed by GitHub
commit 18dd90139a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -2,7 +2,7 @@ var eejs = require('ep_etherpad-lite/node/eejs');
exports.expressCreateServer = function (hook_name, args, cb) { exports.expressCreateServer = function (hook_name, args, cb) {
args.app.get('/admin', function(req, res) { args.app.get('/admin', function(req, res) {
if('/' != req.path[req.path.length-1]) return res.redirect('/admin/'); if('/' != req.path[req.path.length-1]) return res.redirect('./admin/');
res.send( eejs.require("ep_etherpad-lite/templates/admin/index.html", {}) ); res.send( eejs.require("ep_etherpad-lite/templates/admin/index.html", {}) );
}); });
} }