From e34ad9efd7c597b9b22d5b237feb867945306294 Mon Sep 17 00:00:00 2001 From: Daniel Winzen Date: Sat, 26 Aug 2017 14:49:03 +0200 Subject: [PATCH] Allow browser caching of common ressources (js, css img, vid and audio) --- etc/nginx/nginx.conf | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/etc/nginx/nginx.conf b/etc/nginx/nginx.conf index 233d7d4..12bbd1a 100644 --- a/etc/nginx/nginx.conf +++ b/etc/nginx/nginx.conf @@ -39,6 +39,16 @@ http { include /etc/nginx/mime.types; default_type application/octet-stream; + map $sent_http_content_type $expires { + default off; + ~image/ 10d; + ~video/ 10d; + ~audio/ 10d; + text/css 10d; + application/javascript 10d; + } + expires $expires; + ## # Logging Settings ##