diff --git a/settings.json.template b/settings.json.template
index 95ed8c6a6..66192e4b9 100644
--- a/settings.json.template
+++ b/settings.json.template
@@ -6,6 +6,10 @@
{
// Name your instance!
"title": "Etherpad Lite",
+
+ // favicon default name
+ // alternatively, set up a fully specified Url to your own favicon
+ "favicon": "favicon.ico",
//Ip and port which etherpad should bind at
"ip": "0.0.0.0",
diff --git a/src/node/hooks/express/specialpages.js b/src/node/hooks/express/specialpages.js
index 50d27700a..440024614 100644
--- a/src/node/hooks/express/specialpages.js
+++ b/src/node/hooks/express/specialpages.js
@@ -24,8 +24,20 @@ exports.expressCreateServer = function (hook_name, args, cb) {
});
});
- //serve favicon.ico
- args.app.get('/favicon.ico', function(req, res)
+ //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");
res.sendfile(filePath, function(err)
@@ -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
diff --git a/src/node/utils/Settings.js b/src/node/utils/Settings.js
index fff79b602..4cc22045a 100644
--- a/src/node/utils/Settings.js
+++ b/src/node/utils/Settings.js
@@ -34,6 +34,11 @@ exports.root = path.normalize(path.join(npm.dir, ".."));
*/
exports.title = "Etherpad Lite";
+/**
+ * The app favicon fully specified url, visible e.g. in the browser window
+ */
+exports.favicon = "favicon.ico";
+
/**
* The IP ep-lite should listen to
*/
diff --git a/src/templates/index.html b/src/templates/index.html
index 58af9a5ea..23c3c7755 100644
--- a/src/templates/index.html
+++ b/src/templates/index.html
@@ -32,7 +32,7 @@
-
+