Fix sitemap plugin can't provide xml content type in GET route (#9203)

* Update get-tiddler-html.js

* Create #9203.tid
This commit is contained in:
lin onetwo
2026-02-04 11:19:56 +00:00
committed by GitHub
parent 196683915c
commit 486d3bd326
2 changed files with 12 additions and 2 deletions
@@ -33,8 +33,8 @@ exports.handler = function(request,response,state) {
}
var text = state.wiki.renderTiddler(renderType,renderTemplate,{parseAsInline: true, variables: {currentTiddler: title}});
// Naughty not to set a content-type, but it's the easiest way to ensure the browser will see HTML pages as HTML, and accept plain text tiddlers as CSS or JS
state.sendResponse(200,{},text,"utf8");
var headers = {"Content-Type": renderType};
state.sendResponse(200,headers,text,"utf8");
} else {
response.writeHead(404);
response.end();