Add jsmpeg; simplify file filtering
This commit is contained in:
parent
aeed22a417
commit
e7a426994b
2
Makefile
2
Makefile
|
@ -1,3 +1,3 @@
|
||||||
install:
|
install:
|
||||||
@echo Installing into $(DESTDIR)
|
@echo Installing into $(DESTDIR)
|
||||||
@cp router.php parsedown.php $(DESTDIR)
|
@cp *.php $(DESTDIR)
|
||||||
|
|
1
jsmpeg.min.js
vendored
Normal file
1
jsmpeg.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -18,7 +18,12 @@ if (!$site) {
|
||||||
}
|
}
|
||||||
$site = json_decode($site, true);
|
$site = json_decode($site, true);
|
||||||
|
|
||||||
if (preg_match('/\.(?:jpg|png|webp|css|ico|js|ttf|woff|txt)/', $_SERVER["REQUEST_URI"])) {
|
$banned_ext = "php|json|md";
|
||||||
|
|
||||||
|
if (is_file($tryuri)) {
|
||||||
|
if (preg_match("/\.(?:$banned_ext)/", $tryuri))
|
||||||
|
load_page("404");
|
||||||
|
else
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue