summaryrefslogtreecommitdiff
path: root/handle_css.php
blob: f53892c575974fca2aca9385e4b40d29cce08f5f (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\CSS(
    __DIR__ . '/common/css/' .
    basename($_GET['css'])
);

header('Content-Type: text/css; charset=utf-8');
echo $m->minify();