diff options
author | Wikinaut <mail@tgries.de> | 2012-11-04 13:02:55 +0100 |
---|---|---|
committer | Wikinaut <mail@tgries.de> | 2012-11-04 13:02:55 +0100 |
commit | a575de7884ef0ee3df40ca806c0e59fb58d37d2d (patch) | |
tree | dedb904201aa85b590ea8a5155d5983e65ad95dd /src/node/hooks/express | |
parent | c92b5283fd08d5c95dd6c45608a657f45602f896 (diff) | |
download | etherpad-lite-a575de7884ef0ee3df40ca806c0e59fb58d37d2d.zip |
allow favicon.ico as pad name
Diffstat (limited to 'src/node/hooks/express')
-rw-r--r-- | src/node/hooks/express/specialpages.js | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/node/hooks/express/specialpages.js b/src/node/hooks/express/specialpages.js index 96bb324f..44002461 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 |