From 25c0a843478086e0de7f8f6549faa11dd8d2ee7d Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 2 May 2022 18:47:49 +0200 Subject: [PATCH] Update nginx.conf --- conf/nginx.conf | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index af84758..bffb800 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,3 +1,12 @@ +# Expires mappings +map $sent_http_content_type $expires { + default off; + text/html epoch; + text/css max; + application/javascript max; + ~image/ max; +} + location ^~ /.well-known { # The following 6 rules are borrowed from `.htaccess` @@ -63,7 +72,7 @@ location ^~ __PATH__/ { index index.php index.html __PATH__/index.php$request_uri; # Default Cache-Control policy - expires 1m; + expires $expires; # Rule borrowed from `.htaccess` to handle Microsoft DAV clients location = __PATH__/ {