diff options
Diffstat (limited to 'handle_js.php')
| -rw-r--r-- | handle_js.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/handle_js.php b/handle_js.php new file mode 100644 index 0000000..bfddadf --- /dev/null +++ b/handle_js.php @@ -0,0 +1,18 @@ +<?php +/* vim: set ts=4 sw=4 et : */ + +if (strstr($_SERVER['REQUEST_URI'], 'handle_')) { + header("HTTP/1.0 404 Not Found"); + exit(0); +} + +require_once __DIR__ . '/common/vendor/autoload.php'; + +use MatthiasMullie\Minify; +$m = new Minify\JS( + __DIR__ . '/common/js/' . + basename($_GET['js']) +); + +header('Content-Type: application/javascript; charset=utf-8'); +echo $m->minify(); |
