mirror of
https://github.com/Jermolene/TiddlyWiki5.git
synced 2026-03-07 14:30:38 -08: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:
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();
|
||||
|
|
|
|||
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).
|
||||
Loading…
Add table
Add a link
Reference in a new issue