From 4a21f4fe3a37247bd2ddfc57b4ae1240af012ccf Mon Sep 17 00:00:00 2001 From: Hubert Van De Walle Date: Fri, 8 May 2020 00:53:39 +0200 Subject: [PATCH] Cache fonts --- Caddyfile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Caddyfile b/Caddyfile index 923d918..8a4566b 100644 --- a/Caddyfile +++ b/Caddyfile @@ -18,6 +18,11 @@ simplenotes.be { file } + @fonts { + path *.woff *.woff2 + file + } + @404 { expression {http.error.status_code} == 404 } @@ -37,7 +42,8 @@ simplenotes.be { reverse_proxy http://api:8081 } - header @static Cache-Control "public, max-age=31536000" + header @static Cache-Control "public, max-age=31536000" # 1 year + header @fonts Cache-Control "public, max-age=604800" # 7 days header Content-Security-Policy "default-src 'self' 'unsafe-inline';" encode gzip