1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-10-31 21:33:00 +00:00

Add x-tags to raw action

This commit is contained in:
Starbeamrainbowlabs 2022-06-29 00:06:36 +01:00
parent cfd45c75ae
commit 234f9fa371
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
2 changed files with 4 additions and 1 deletions

View file

@ -11,6 +11,7 @@ This file holds the changelog for Pepperminty Wiki. This is the master list of t
- Added [oneboxing](https://meta.discourse.org/t/rich-link-previews-with-onebox/98088): rich previews for internal links. If an internal link with 3 square brackets (e.g. `[[[example]]]`) is on it's own with nothing before or after it on a line, then it'll be turned into a onebox
- 2 new settings have also been added to control it: `parser_onebox_enabled` and `parser_onebox_preview_length`
- TODO: Update the dynamic help page for this.
- [Rest API] Add new `x-tags` HTTP header to `raw` action
### Changed
- Display returnto URL above the login form if present to further mitigate CSRF issues

View file

@ -5,7 +5,7 @@
register_module([
"name" => "Raw page source",
"version" => "0.8",
"version" => "0.9",
"author" => "Starbeamrainbowlabs",
"description" => "Adds a 'raw' action that shows you the raw source of a page.",
"id" => "action-raw",
@ -41,6 +41,8 @@ register_module([
header("content-type: text/markdown");
header("content-disposition: inline");
header("content-length: " . filesize($env->page_filename));
header("x-tags: " . str_replace(["\n", ":"], "", $pageindex->$page->tags));
exit(file_get_contents($env->page_filename));
});