configurable gzip compression, defaults to false

This commit is contained in:
Miraty 2024-02-10 14:10:49 +01:00
parent 66df795d25
commit cd780914d4

View file

@ -39,6 +39,7 @@ $config['center-index'] ??= false;
$config['default-lang'] ??= NULL;
$config['announce-css'] ??= false;
$config['announce-feed'] ??= false;
$config['gzip'] ??= false;
if (!isset($config['id'])) {
$config['id'] = bin2hex(random_bytes(32));
@ -261,7 +262,7 @@ foreach ($pages as $node) {
file_put_contents($base_filepath_target . '.html', $content);
// Gzip compression
if ($config['gzip'])
exec('gzip --keep --fast --force ' . $base_filepath_target . '.html');
}