mirror of
				https://github.com/Jermolene/TiddlyWiki5
				synced 2025-11-04 01:23:01 +00:00 
			
		
		
		
	Add favicon.ico support to the server
This commit is contained in:
		@@ -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$/,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user