router fix
This commit is contained in:
parent
06667852d1
commit
e04f1205be
12
router.php
12
router.php
|
@ -7,17 +7,23 @@ require "parsedown.php";
|
|||
$tryuri = ltrim("$_SERVER[REQUEST_URI]", '/');
|
||||
$tryuri = strtok($tryuri, "?");
|
||||
|
||||
if (page_locked($tryuri)) {
|
||||
load_page("404");
|
||||
}
|
||||
|
||||
$site = file_get_contents("site.json");
|
||||
if (!$site) {
|
||||
echo "Need a site.json file to work!";
|
||||
return false;
|
||||
}
|
||||
|
||||
$site = json_decode($site, true);
|
||||
|
||||
if (page_locked($tryuri)) {
|
||||
load_page("404");
|
||||
}
|
||||
|
||||
if ($tryuri == "router" || $tryuri == "parsedown") {
|
||||
load_page("404");
|
||||
}
|
||||
|
||||
$banned_ext = "php|json|md";
|
||||
|
||||
if (is_file($tryuri)) {
|
||||
|
|
Loading…
Reference in a new issue