From a575de7884ef0ee3df40ca806c0e59fb58d37d2d Mon Sep 17 00:00:00 2001 From: Wikinaut Date: Sun, 4 Nov 2012 13:02:55 +0100 Subject: [PATCH] allow favicon.ico as pad name --- src/node/hooks/express/specialpages.js | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/node/hooks/express/specialpages.js b/src/node/hooks/express/specialpages.js index 96bb324fc..440024614 100644 --- a/src/node/hooks/express/specialpages.js +++ b/src/node/hooks/express/specialpages.js @@ -24,7 +24,19 @@ exports.expressCreateServer = function (hook_name, args, cb) { }); }); - //serve favicon.ico from all path levels + //serve pad.html under /p + args.app.get('/p/:pad', function(req, res, next) + { + res.send(eejs.require("ep_etherpad-lite/templates/pad.html", {req: req})); + }); + + //serve timeslider.html under /p/$padname/timeslider + args.app.get('/p/:pad/timeslider', function(req, res, next) + { + res.send(eejs.require("ep_etherpad-lite/templates/timeslider.html", {req: req})); + }); + + //serve favicon.ico from all path levels except as a pad name args.app.get( /\/favicon.ico$/, function(req, res) { var filePath = path.normalize(__dirname + "/../../../static/custom/favicon.ico"); @@ -39,16 +51,5 @@ exports.expressCreateServer = function (hook_name, args, cb) { }); }); - //serve pad.html under /p - args.app.get('/p/:pad', function(req, res, next) - { - res.send(eejs.require("ep_etherpad-lite/templates/pad.html", {req: req})); - }); - - //serve timeslider.html under /p/$padname/timeslider - args.app.get('/p/:pad/timeslider', function(req, res, next) - { - res.send(eejs.require("ep_etherpad-lite/templates/timeslider.html", {req: req})); - }); } \ No newline at end of file