summaryrefslogtreecommitdiff
path: root/handle_js.php
blob: bfddadf2cb070390e203783e2a0a562237172744 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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();