mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-01 15:46:18 +00:00
25 lines
478 B
JavaScript
25 lines
478 B
JavaScript
/*\
|
|
title: $:/core/modules/server/routes/get-favicon.js
|
|
type: application/javascript
|
|
module-type: route
|
|
|
|
GET /favicon.ico
|
|
|
|
\*/
|
|
(function() {
|
|
|
|
/*jslint node: true, browser: true */
|
|
/*global $tw: false */
|
|
"use strict";
|
|
|
|
exports.method = "GET";
|
|
|
|
exports.path = /^\/favicon.ico$/;
|
|
|
|
exports.handler = function(request,response,state) {
|
|
var buffer = state.wiki.getTiddlerText("$:/favicon.ico","");
|
|
state.sendResponse(200,{"Content-Type": "image/x-icon"},buffer,"base64");
|
|
};
|
|
|
|
}());
|