From: Ralf Jung Date: Sun, 20 Nov 2022 12:19:20 +0000 (+0100) Subject: apache: configure cache-control header X-Git-Url: https://git.ralfj.de/ansible.git/commitdiff_plain/187c60cec533f1fb2a3f8b2339be2e9a4e199e00?ds=inline apache: configure cache-control header --- 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" +