Add jsmpeg; simplify file filtering

This commit is contained in:
John Alanbrook 2023-04-14 17:41:29 +00:00
parent aeed22a417
commit e7a426994b
3 changed files with 8 additions and 2 deletions

View file

@ -1,3 +1,3 @@
install:
@echo Installing into $(DESTDIR)
@cp router.php parsedown.php $(DESTDIR)
@cp *.php $(DESTDIR)

1
jsmpeg.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -18,7 +18,12 @@ if (!$site) {
}
$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;
}