From 0d31cc657f318350316469a05abb1bccdc5b9320 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Wed, 4 Dec 2019 18:27:43 +0530 Subject: [PATCH] Caddyfile: Properly setup caching Cache contents for a week, and allow upto 10 seconds to validate the cache Signed-off-by: Harsh Shandilya --- Caddyfile | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Caddyfile b/Caddyfile index 36840f7..9355dc7 100644 --- a/Caddyfile +++ b/Caddyfile @@ -14,6 +14,7 @@ X-Frame-Options "SAMEORIGIN" Feature-Policy "accelerometer 'none';ambient-light-sensor 'none'; autoplay 'none';camera 'none';encrypted-media 'none'; geolocation 'none';gyroscope 'none';magnetometer 'none';microphone 'none';midi 'none';payment 'none';picture-in-picture 'none'; speaker 'none';sync-xhr 'none';usb 'none';vr 'none'" Referrer-Policy "no-referrer" + Cache-Control 'max-age=604800,stale-while-revalidate=10' } } @@ -31,9 +32,6 @@ https://msfjarvis.website { import base_config import compression_config root /var/www/msfjarvis.website/ - header / { - Cache-Control "no-cache" - } } https://bin.msfjarvis.website { @@ -95,7 +93,4 @@ https://staging.msfjarvis.website { import base_config import compression_config root /var/www/msfjarvis.website.staging/ - header / { - Cache-Control "no-cache" - } }