mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-28 02:50:27 +00:00
Fix Comment in Webserver API route tidlers.json (#4557)
This commit fixes the the comment in the route `recipes/default/tiddlers.json` which was inconsistent with the actually used regex. Furthermore, the 403 response was adjusted to also agree with the the new comment and the regex. Co-authored-by: tobidot <post@tobidot.net>
This commit is contained in:
parent
5688670da6
commit
154e886873
@ -3,7 +3,7 @@ title: $:/core/modules/server/routes/get-tiddlers-json.js
|
||||
type: application/javascript
|
||||
module-type: route
|
||||
|
||||
GET /recipes/default/tiddlers/tiddlers.json?filter=<filter>
|
||||
GET /recipes/default/tiddlers.json?filter=<filter>
|
||||
|
||||
\*/
|
||||
(function() {
|
||||
@ -22,7 +22,7 @@ exports.handler = function(request,response,state) {
|
||||
var filter = state.queryParameters.filter || DEFAULT_FILTER;
|
||||
if($tw.wiki.getTiddlerText("$:/config/Server/AllowAllExternalFilters") !== "yes") {
|
||||
if($tw.wiki.getTiddlerText("$:/config/Server/ExternalFilters/" + filter) !== "yes") {
|
||||
console.log("Blocked attempt to GET /recipes/default/tiddlers/tiddlers.json with filter: " + filter);
|
||||
console.log("Blocked attempt to GET /recipes/default/tiddlers.json with filter: " + filter);
|
||||
response.writeHead(403);
|
||||
response.end();
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user