mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-22 04:23:01 +00:00
Remove old 307 redirect from raw action.
This commit is contained in:
parent
7cdd083ed6
commit
3c14063f0d
1 changed files with 1 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
register_module([
|
register_module([
|
||||||
"name" => "Raw page source",
|
"name" => "Raw page source",
|
||||||
"version" => "0.5",
|
"version" => "0.6",
|
||||||
"author" => "Starbeamrainbowlabs",
|
"author" => "Starbeamrainbowlabs",
|
||||||
"description" => "Adds a 'raw' action that shows you the raw source of a page.",
|
"description" => "Adds a 'raw' action that shows you the raw source of a page.",
|
||||||
"id" => "action-raw",
|
"id" => "action-raw",
|
||||||
|
@ -18,7 +18,6 @@ register_module([
|
||||||
add_action("raw", function() {
|
add_action("raw", function() {
|
||||||
global $env;
|
global $env;
|
||||||
|
|
||||||
http_response_code(307);
|
|
||||||
header("x-filename: " . rawurlencode($env->page) . ".md");
|
header("x-filename: " . rawurlencode($env->page) . ".md");
|
||||||
header("content-type: text/markdown");
|
header("content-type: text/markdown");
|
||||||
exit(file_get_contents("$env->storage_prefix$env->page.md"));
|
exit(file_get_contents("$env->storage_prefix$env->page.md"));
|
||||||
|
|
Loading…
Reference in a new issue