From 62d9272c054578e22827f8cc43994b45f1506439 Mon Sep 17 00:00:00 2001 From: Mansoor A Date: Sun, 6 May 2018 11:16:53 +0530 Subject: [PATCH 1/2] Allow browser caching for static contents --- conf/nginx-alldomains.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/conf/nginx-alldomains.conf b/conf/nginx-alldomains.conf index 1db7606c..554081f3 100644 --- a/conf/nginx-alldomains.conf +++ b/conf/nginx-alldomains.conf @@ -12,6 +12,11 @@ access_log off; } + location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ { + expires 30d; + add_header Cache-Control "public"; + } + location = /mailinabox.mobileconfig { alias /var/lib/mailinabox/mobileconfig.xml; } From 92a35f8857c28efca995c7d49a8a76fe880df010 Mon Sep 17 00:00:00 2001 From: Mansoor A Date: Sun, 6 May 2018 11:17:34 +0530 Subject: [PATCH 2/2] Add svg too --- conf/nginx-alldomains.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/nginx-alldomains.conf b/conf/nginx-alldomains.conf index 554081f3..64fbaf53 100644 --- a/conf/nginx-alldomains.conf +++ b/conf/nginx-alldomains.conf @@ -12,7 +12,7 @@ access_log off; } - location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ { + location ~* \.(jpg|jpeg|svg|png|gif|ico|css|js)$ { expires 30d; add_header Cache-Control "public"; }