From 187c60cec533f1fb2a3f8b2339be2e9a4e199e00 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 20 Nov 2022 13:19:20 +0100 Subject: [PATCH] apache: configure cache-control header --- roles/apache/tasks/main.yml | 2 ++ roles/apache/templates/caching.conf | 7 +++++++ 2 files changed, 9 insertions(+) create mode 100644 roles/apache/templates/caching.conf diff --git a/roles/apache/tasks/main.yml b/roles/apache/tasks/main.yml index fee26ef..6878845 100644 --- a/roles/apache/tasks/main.yml +++ b/roles/apache/tasks/main.yml @@ -35,6 +35,7 @@ - php5.conf - security.conf - defaults.conf + - caching.conf notify: apache - name: enable config files command: a2enconf {{ item }} @@ -44,6 +45,7 @@ - ssl - security - defaults + - caching notify: apache - name: disable config files command: a2disconf {{ item }} diff --git a/roles/apache/templates/caching.conf b/roles/apache/templates/caching.conf new file mode 100644 index 0000000..7880aec --- /dev/null +++ b/roles/apache/templates/caching.conf @@ -0,0 +1,7 @@ + + Header set Cache-Control "max-age=86400, public" + + + + Header set Cache-Control "no-cache" + -- 2.30.2