From 74e908ea8236501e6801154d425701cd0b152a2b Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Fri, 10 Jan 2025 14:07:43 -0800 Subject: [PATCH] apache: Enable expires module by default - Can be used to set the 'Expires:' header to cache static files for a long time. Tests: - Without the patch 'a2query -m expires' shows that the module is not installed. Applying the patches and restarting services shows that Apache app's setup is run and 'a2query -m expires' shows that module is enabled. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/modules/apache/__init__.py | 2 +- plinth/modules/apache/privileged.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/plinth/modules/apache/__init__.py b/plinth/modules/apache/__init__.py index 14bde4e3a..3e2ccd7d2 100644 --- a/plinth/modules/apache/__init__.py +++ b/plinth/modules/apache/__init__.py @@ -22,7 +22,7 @@ class ApacheApp(app_module.App): app_id = 'apache' - _version = 13 + _version = 14 def __init__(self) -> None: """Create components for the app.""" diff --git a/plinth/modules/apache/privileged.py b/plinth/modules/apache/privileged.py index b3e07b761..2612c1ee8 100644 --- a/plinth/modules/apache/privileged.py +++ b/plinth/modules/apache/privileged.py @@ -88,6 +88,7 @@ def setup(old_version: int): webserver.enable('proxy_html', kind='module') webserver.enable('rewrite', kind='module') webserver.enable('macro', kind='module') + webserver.enable('expires', kind='module') # Disable logging into files, use FreedomBox configured systemd logging webserver.disable('other-vhosts-access-log', kind='config')