mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-03-09 17:29:51 +00:00
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:
@@ -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();
|
||||
|
||||
10
editions/tw5.com/tiddlers/releasenotes/5.4.0/#9203.tid
Normal file
10
editions/tw5.com/tiddlers/releasenotes/5.4.0/#9203.tid
Normal file
@@ -0,0 +1,10 @@
|
||||
title: $:/changenotes/5.4.0/#9203
|
||||
description: Fix not provide content-type header in GET routes
|
||||
release: 5.4.0
|
||||
tags: $:/tags/ChangeNote
|
||||
change-type: bugfix
|
||||
change-category: nodejs
|
||||
github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/9203
|
||||
github-contributors: linonetwo
|
||||
|
||||
Fixed an issue which prevented plugins like the sitemap plugin from setting the correct MIME types (e.g., application/xml).
|
||||
Reference in New Issue
Block a user