mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 15:36:16 -04:00
update for express 4.x
This commit is contained in:
parent
7b86eb09bc
commit
d0b39c01fb
8 changed files with 25 additions and 24 deletions
|
@ -19,13 +19,13 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
|||
args.app.get('/robots.txt', function(req, res)
|
||||
{
|
||||
var filePath = path.normalize(__dirname + "/../../../static/custom/robots.txt");
|
||||
res.sendfile(filePath, function(err)
|
||||
res.sendFile(filePath, function(err)
|
||||
{
|
||||
//there is no custom favicon, send the default robots.txt which dissallows all
|
||||
if(err)
|
||||
{
|
||||
filePath = path.normalize(__dirname + "/../../../static/robots.txt");
|
||||
res.sendfile(filePath);
|
||||
res.sendFile(filePath);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -60,13 +60,13 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
|||
args.app.get( /\/favicon.ico$/, function(req, res)
|
||||
{
|
||||
var filePath = path.normalize(__dirname + "/../../../static/custom/favicon.ico");
|
||||
res.sendfile(filePath, function(err)
|
||||
res.sendFile(filePath, function(err)
|
||||
{
|
||||
//there is no custom favicon, send the default favicon
|
||||
if(err)
|
||||
{
|
||||
filePath = path.normalize(__dirname + "/../../../static/favicon.ico");
|
||||
res.sendfile(filePath);
|
||||
res.sendFile(filePath);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue