From 5fe60e72218d6371158a29ed5cc345b37a16b27a Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Thu, 14 Mar 2013 15:59:39 +0100 Subject: [PATCH] redirect /admin to /admin/ so that the relative links work --- src/node/hooks/express/admin.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/node/hooks/express/admin.js b/src/node/hooks/express/admin.js index 766370fc3..70539f0c4 100644 --- a/src/node/hooks/express/admin.js +++ b/src/node/hooks/express/admin.js @@ -2,6 +2,7 @@ var eejs = require('ep_etherpad-lite/node/eejs'); exports.expressCreateServer = function (hook_name, args, cb) { args.app.get('/admin', function(req, res) { + if('/' != req.path[req.path.length-1]) return res.redirect('/admin/'); res.send( eejs.require("ep_etherpad-lite/templates/admin/index.html", {}) ); }); }