1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-02-22 14:00:03 +00:00

Add favicon.ico support to the server

This commit is contained in:
Jermolene 2013-12-18 17:27:24 +00:00
parent 07dd524016
commit a4e3f66809

View File

@ -197,6 +197,15 @@ var Command = function(params,commander,callback) {
response.end(text,"utf8");
}
});
this.server.addRoute({
method: "GET",
path: /^\/favicon.ico$/,
handler: function(request,response,state) {
response.writeHead(200, {"Content-Type": "image/x-icon"});
var buffer = state.wiki.getTiddlerText("$:/favicon.ico","");
response.end(buffer,"base64");
}
});
this.server.addRoute({
method: "GET",
path: /^\/recipes\/default\/tiddlers.json$/,