From 2b7053ff8bfb5707eecd4563c8ce22444a067477 Mon Sep 17 00:00:00 2001 From: Hubert Van De Walle Date: Fri, 1 May 2020 00:08:01 +0200 Subject: [PATCH] Add caching headers --- nginx/server.conf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nginx/server.conf b/nginx/server.conf index cacdd7e..ae0f72a 100644 --- a/nginx/server.conf +++ b/nginx/server.conf @@ -28,6 +28,12 @@ server { gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/xml; gzip_disable "MSIE [1-6]\."; + location ~* \.(css|js)$ { + root /usr/share/nginx/html; + expires 1d; + add_header Cache-Control "public, max-age=86400"; + } + location / { root /usr/share/nginx/html; index index.html index.htm;